#importing of main libriries
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
warnings.filterwarnings('ignore')
C:\Users\vinayaka\anaconda3\lib\site-packages\scipy\__init__.py:155: UserWarning: A NumPy version >=1.18.5 and <1.25.0 is required for this version of SciPy (detected version 1.26.4
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
# import the data set
data = pd.read_csv("C:\\Users\\vinayaka\Downloads\\Minsk2020_ALS_dataset.csv")
#first five rows of data
data.head()
| ID | Sex | Age | J1_a | J3_a | J5_a | J55_a | S1_a | S3_a | S5_a | ... | dCCi(7) | dCCi(8) | dCCi(9) | dCCi(10) | dCCi(11) | dCCi(12) | d_1 | F2_i | F2_{conv} | Diagnosis (ALS) | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 8 | M | 58 | 0.321817 | 0.141230 | 0.199128 | 0.923634 | 6.044559 | 3.196477 | 3.770575 | ... | -0.024467 | -0.005300 | 0.051874 | -0.037710 | -0.026549 | -0.021149 | 4.825476 | 2526.285657 | 833.498083 | 1 |
| 1 | 20 | F | 57 | 0.344026 | 0.177032 | 0.206458 | 0.827714 | 1.967728 | 0.856639 | 1.179851 | ... | 0.002485 | -0.004535 | -0.000225 | -0.006977 | -0.012510 | 0.014773 | 5.729322 | 1985.712014 | 561.802625 | 1 |
| 2 | 21 | F | 58 | 0.264740 | 0.148228 | 0.177078 | 0.532566 | 1.850893 | 0.942743 | 1.071950 | ... | -0.013927 | 0.007908 | 0.007960 | -0.009022 | -0.012488 | -0.015588 | 8.258488 | 2364.695972 | 796.723440 | 1 |
| 3 | 22 | F | 70 | 0.455793 | 0.174870 | 0.243660 | 0.962641 | 2.883768 | 1.284926 | 1.915058 | ... | -0.019285 | -0.021768 | 0.020495 | 0.035976 | -0.034648 | 0.008021 | 5.447137 | 1860.172768 | 359.409974 | 1 |
| 4 | 24 | M | 66 | 0.269335 | 0.143961 | 0.167465 | 0.547745 | 2.327924 | 1.164109 | 1.420891 | ... | -0.005743 | 0.004726 | -0.015247 | 0.003900 | -0.007686 | -0.003784 | 8.562517 | 2051.627447 | 817.111847 | 1 |
5 rows × 135 columns
# last five rows of data
data.tail()
| ID | Sex | Age | J1_a | J3_a | J5_a | J55_a | S1_a | S3_a | S5_a | ... | dCCi(7) | dCCi(8) | dCCi(9) | dCCi(10) | dCCi(11) | dCCi(12) | d_1 | F2_i | F2_{conv} | Diagnosis (ALS) | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 59 | 123 | M | 43 | 0.255799 | 0.123679 | 0.182658 | 0.505591 | 6.222031 | 2.876602 | 3.894294 | ... | 0.220533 | 0.089766 | -0.120838 | -0.004221 | -0.013165 | 0.004642 | 9.855665 | 3128.341308 | 1990.937097 | 0 |
| 60 | 125 | M | 63 | 0.513175 | 0.296489 | 0.334845 | 0.729804 | 9.686563 | 4.327943 | 5.687977 | ... | 0.028016 | -0.038739 | 0.011588 | -0.011281 | -0.004294 | 0.011239 | 11.094558 | 1964.218942 | 601.076046 | 0 |
| 61 | 127 | F | 67 | 0.383901 | 0.245923 | 0.251359 | 0.415136 | 4.148414 | 2.069757 | 2.527213 | ... | 0.011685 | 0.007883 | -0.014839 | 0.013859 | 0.011145 | 0.001418 | 12.564742 | 2526.285657 | 934.343638 | 0 |
| 62 | 129 | F | 68 | 1.336216 | 0.815757 | 0.733197 | 0.981928 | 11.224542 | 5.295879 | 6.994751 | ... | 0.015712 | 0.013437 | 0.025113 | 0.008852 | -0.010132 | -0.008458 | 10.670669 | 3201.250289 | 2284.051658 | 0 |
| 63 | 131 | F | 60 | 0.916706 | 0.566121 | 0.512857 | 1.467165 | 6.372832 | 3.251168 | 3.539229 | ... | -0.046235 | 0.041946 | -0.065313 | -0.016682 | 0.061026 | -0.005883 | 6.972152 | 2792.655884 | 1518.529172 | 0 |
5 rows × 135 columns
# information of data and data types
for i in data.columns:
print(f"'{i}' data type: {data[i].dtypes}")
'ID' data type: int64
'Sex' data type: object
'Age' data type: int64
'J1_a' data type: float64
'J3_a' data type: float64
'J5_a' data type: float64
'J55_a' data type: float64
'S1_a' data type: float64
'S3_a' data type: float64
'S5_a' data type: float64
'S11_a' data type: float64
'S55_a' data type: float64
'DPF_a' data type: float64
'PFR_a' data type: float64
'PPE_a' data type: float64
'PVI_a' data type: float64
'HNR_a' data type: float64
'GNEa_{\mu}' data type: float64
'GNEa_{\sigma}' data type: float64
'Ha(1)_{mu}' data type: float64
'Ha(2)_{mu}' data type: float64
'Ha(3)_{mu}' data type: float64
'Ha(4)_{mu}' data type: float64
'Ha(5)_{mu}' data type: float64
'Ha(6)_{mu}' data type: float64
'Ha(7)_{mu}' data type: float64
'Ha(8)_{mu}' data type: float64
'Ha(1)_{sd}' data type: float64
'Ha(2)_{sd}' data type: float64
'Ha(3)_{sd}' data type: float64
'Ha(4)_{sd}' data type: float64
'Ha(5)_{sd}' data type: float64
'Ha(6)_{sd}' data type: float64
'Ha(7)_{sd}' data type: float64
'Ha(8)_{sd}' data type: float64
'Ha(1)_{rel}' data type: float64
'Ha(2)_{rel}' data type: float64
'Ha(3)_{rel}' data type: float64
'Ha(4)_{rel}' data type: float64
'Ha(5)_{rel}' data type: float64
'Ha(6)_{rel}' data type: float64
'Ha(7)_{rel}' data type: float64
'Ha(8)_{rel}' data type: float64
'CCa(1)' data type: float64
'CCa(2)' data type: float64
'CCa(3)' data type: float64
'CCa(4)' data type: float64
'CCa(5)' data type: float64
'CCa(6)' data type: float64
'CCa(7)' data type: float64
'CCa(8)' data type: float64
'CCa(9)' data type: float64
'CCa(10)' data type: float64
'CCa(11)' data type: float64
'CCa(12)' data type: float64
'dCCa(1)' data type: float64
'dCCa(2)' data type: float64
'dCCa(3)' data type: float64
'dCCa(4)' data type: float64
'dCCa(5)' data type: float64
'dCCa(6)' data type: float64
'dCCa(7)' data type: float64
'dCCa(8)' data type: float64
'dCCa(9)' data type: float64
'dCCa(10)' data type: float64
'dCCa(11)' data type: float64
'dCCa(12)' data type: float64
'J1_i' data type: float64
'J3_i' data type: float64
'J5_i' data type: float64
'J55_i' data type: float64
'S1_i' data type: float64
'S3_i' data type: float64
'S5_i' data type: float64
'S11_i' data type: float64
'S55_i' data type: float64
'DPF_i' data type: float64
'PFR_i' data type: float64
'PPE_i' data type: float64
'PVI_i' data type: float64
'HNR_i' data type: float64
'GNEi_{\mu}' data type: float64
'GNEi_{\sigma}' data type: float64
'Hi(1)_{mu}' data type: float64
'Hi(2)_{mu}' data type: float64
'Hi(3)_{mu}' data type: float64
'Hi(4)_{mu}' data type: float64
'Hi(5)_{mu}' data type: float64
'Hi(6)_{mu}' data type: float64
'Hi(7)_{mu}' data type: float64
'Hi(8)_{mu}' data type: float64
'Hi(1)_{sd}' data type: float64
'Hi(2)_{sd}' data type: float64
'Hi(3)_{sd}' data type: float64
'Hi(4)_{sd}' data type: float64
'Hi(5)_{sd}' data type: float64
'Hi(6)_{sd}' data type: float64
'Hi(7)_{sd}' data type: float64
'Hi(8)_{sd}' data type: float64
'Hi(1)_{rel}' data type: float64
'Hi(2)_{rel}' data type: float64
'Hi(3)_{rel}' data type: float64
'Hi(4)_{rel}' data type: float64
'Hi(5)_{rel}' data type: float64
'Hi(6)_{rel}' data type: float64
'Hi(7)_{rel}' data type: float64
'Hi(8)_{rel}' data type: float64
'CCi(1)' data type: float64
'CCi(2)' data type: float64
'CCi(3)' data type: float64
'CCi(4)' data type: float64
'CCi(5)' data type: float64
'CCi(6)' data type: float64
'CCi(7)' data type: float64
'CCi(8)' data type: float64
'CCi(9)' data type: float64
'CCi(10)' data type: float64
'CCi(11)' data type: float64
'CCi(12)' data type: float64
'dCCi(1)' data type: float64
'dCCi(2)' data type: float64
'dCCi(3)' data type: float64
'dCCi(4)' data type: float64
'dCCi(5)' data type: float64
'dCCi(6)' data type: float64
'dCCi(7)' data type: float64
'dCCi(8)' data type: float64
'dCCi(9)' data type: float64
'dCCi(10)' data type: float64
'dCCi(11)' data type: float64
'dCCi(12)' data type: float64
'd_1' data type: float64
'F2_i' data type: float64
'F2_{conv}' data type: float64
'Diagnosis (ALS)' data type: int64
#find out the data shape (how many columns and how many rows are there)
data.shape
(64, 135)
#describe of data Like count, Mean, Std, Min, quantile(25%,50%,75%), Max
data.describe().T
| count | mean | std | min | 25% | 50% | 75% | max | |
|---|---|---|---|---|---|---|---|---|
| ID | 64.0 | 67.875000 | 37.358198 | 2.000000 | 31.750000 | 66.500000 | 98.250000 | 131.000000 |
| Age | 64.0 | 56.390625 | 10.203668 | 34.000000 | 50.750000 | 58.000000 | 63.250000 | 80.000000 |
| J1_a | 64.0 | 0.658951 | 0.724002 | 0.098881 | 0.325932 | 0.458935 | 0.772783 | 5.391649 |
| J3_a | 64.0 | 0.379242 | 0.435636 | 0.065791 | 0.172422 | 0.253976 | 0.465699 | 3.217293 |
| J5_a | 64.0 | 0.395886 | 0.431926 | 0.092655 | 0.198274 | 0.293405 | 0.476541 | 3.321567 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... |
| dCCi(12) | 64.0 | 0.001269 | 0.020800 | -0.083977 | -0.006534 | 0.000661 | 0.009515 | 0.077897 |
| d_1 | 64.0 | 9.164473 | 2.681449 | 2.276702 | 7.604734 | 9.646564 | 10.757522 | 15.420777 |
| F2_i | 64.0 | 2495.116475 | 617.755856 | 444.730268 | 2051.627447 | 2471.097222 | 2938.236560 | 3599.554394 |
| F2_{conv} | 64.0 | 1209.976405 | 553.694046 | 48.246203 | 800.181156 | 1206.596083 | 1551.677678 | 2441.219054 |
| Diagnosis (ALS) | 64.0 | 0.484375 | 0.503706 | 0.000000 | 0.000000 | 0.000000 | 1.000000 | 1.000000 |
134 rows × 8 columns
# cross check informtion on Sex Like Male and Females
pd.crosstab(data.Sex,data['Diagnosis (ALS)'])
| Diagnosis (ALS) | 0 | 1 |
|---|---|---|
| Sex | ||
| F | 20 | 14 |
| M | 13 | 17 |
# cross check informtion on Sex And Ages
pd.crosstab(data.Age,data.Sex)
| Sex | F | M |
|---|---|---|
| Age | ||
| 34 | 0 | 1 |
| 35 | 0 | 1 |
| 37 | 1 | 0 |
| 38 | 0 | 2 |
| 39 | 2 | 0 |
| 40 | 1 | 1 |
| 41 | 0 | 1 |
| 43 | 0 | 1 |
| 45 | 1 | 0 |
| 49 | 0 | 1 |
| 50 | 3 | 0 |
| 51 | 0 | 1 |
| 52 | 1 | 1 |
| 53 | 2 | 0 |
| 55 | 3 | 0 |
| 57 | 2 | 3 |
| 58 | 1 | 3 |
| 59 | 1 | 0 |
| 60 | 3 | 3 |
| 61 | 0 | 2 |
| 62 | 2 | 0 |
| 63 | 3 | 1 |
| 64 | 3 | 0 |
| 65 | 1 | 0 |
| 66 | 0 | 1 |
| 67 | 2 | 3 |
| 68 | 1 | 2 |
| 69 | 0 | 1 |
| 70 | 1 | 0 |
| 80 | 0 | 1 |
# We are seeing how many age people are there using on Countplot
plt.figure(figsize=(12,8))
age=sns.countplot(x='Age', data=data,)
for i in age.containers:
age.bar_label(i)
plt.figure(figsize=(12,8))
Gender=sns.countplot(x='Sex', data=data)
for i in Gender.containers:
Gender.bar_label(i)
# Convert 'Male' to 0, 'Female' to 1
data["Sex"] =data['Sex'].replace({'M': 0, 'F': 1})
data.head()
| ID | Sex | Age | J1_a | J3_a | J5_a | J55_a | S1_a | S3_a | S5_a | ... | dCCi(7) | dCCi(8) | dCCi(9) | dCCi(10) | dCCi(11) | dCCi(12) | d_1 | F2_i | F2_{conv} | Diagnosis (ALS) | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 8 | 0 | 58 | 0.321817 | 0.141230 | 0.199128 | 0.923634 | 6.044559 | 3.196477 | 3.770575 | ... | -0.024467 | -0.005300 | 0.051874 | -0.037710 | -0.026549 | -0.021149 | 4.825476 | 2526.285657 | 833.498083 | 1 |
| 1 | 20 | 1 | 57 | 0.344026 | 0.177032 | 0.206458 | 0.827714 | 1.967728 | 0.856639 | 1.179851 | ... | 0.002485 | -0.004535 | -0.000225 | -0.006977 | -0.012510 | 0.014773 | 5.729322 | 1985.712014 | 561.802625 | 1 |
| 2 | 21 | 1 | 58 | 0.264740 | 0.148228 | 0.177078 | 0.532566 | 1.850893 | 0.942743 | 1.071950 | ... | -0.013927 | 0.007908 | 0.007960 | -0.009022 | -0.012488 | -0.015588 | 8.258488 | 2364.695972 | 796.723440 | 1 |
| 3 | 22 | 1 | 70 | 0.455793 | 0.174870 | 0.243660 | 0.962641 | 2.883768 | 1.284926 | 1.915058 | ... | -0.019285 | -0.021768 | 0.020495 | 0.035976 | -0.034648 | 0.008021 | 5.447137 | 1860.172768 | 359.409974 | 1 |
| 4 | 24 | 0 | 66 | 0.269335 | 0.143961 | 0.167465 | 0.547745 | 2.327924 | 1.164109 | 1.420891 | ... | -0.005743 | 0.004726 | -0.015247 | 0.003900 | -0.007686 | -0.003784 | 8.562517 | 2051.627447 | 817.111847 | 1 |
5 rows × 135 columns
data['Age'].value_counts()
60 6 67 5 57 5 58 4 63 4 68 3 50 3 55 3 64 3 38 2 53 2 39 2 52 2 40 2 61 2 62 2 37 1 65 1 49 1 59 1 80 1 45 1 34 1 35 1 70 1 66 1 41 1 51 1 69 1 43 1 Name: Age, dtype: int64
data['Age'].mean()
56.390625
data['Age'].median()
58.0
columns= data.select_dtypes(include="number").columns
#see the histogramplots column wise
for column in data:
plt.figure(figsize=(10, 6))
k = data[column].kurt()
s = data[column].skew()
sns.histplot(data[column], kde=True, label= f'kurtosis: {k} & skewness: {s}')
plt.title(f'Histogram of {column}')
plt.legend()
plt.show()
for col in columns:
plt.boxplot(data[col])
plt.title(f'Boxplot of {col}')
plt.xlabel(col)
plt.ylabel("frequency")
plt.tight_layout()
plt.show()
# create the dictionaries for statistics
means = {}
stds = {}
maxs = {}
mins = {}
vars = {}
# Calculate statistics for each column
for i in data.columns:
means[i] = data[i].mean()
stds[i] = data[i].std()
maxs[i] = data[i].max()
mins[i] = data[i].min()
vars[i] = data[i].var()
print(f"Column: {i}")
print(f"Mean: {means[i]}")
print(f"Standard Deviation: {stds[i]}")
print(f"Max: {maxs[i]}")
print(f"Min: {mins[i]}")
print(f"Var: {vars[i]}")
print('-----'*10)
Column: ID
Mean: 67.875
Standard Deviation: 37.35819750248827
Max: 131
Min: 2
Var: 1395.6349206349207
--------------------------------------------------
Column: Sex
Mean: 0.53125
Standard Deviation: 0.5029673851018478
Max: 1
Min: 0
Var: 0.25297619047619047
--------------------------------------------------
Column: Age
Mean: 56.390625
Standard Deviation: 10.203667544035643
Max: 80
Min: 34
Var: 104.11483134920636
--------------------------------------------------
Column: J1_a
Mean: 0.6589510923264591
Standard Deviation: 0.7240019797240058
Max: 5.39164911025152
Min: 0.0988808740961693
Var: 0.5241788666442797
--------------------------------------------------
Column: J3_a
Mean: 0.37924166747964577
Standard Deviation: 0.4356357937217889
Max: 3.21729269682184
Min: 0.0657908570911333
Var: 0.18977854477161302
--------------------------------------------------
Column: J5_a
Mean: 0.3958855278231064
Standard Deviation: 0.43192613709803857
Max: 3.32156682922536
Min: 0.092654708047529
Var: 0.1865601879084336
--------------------------------------------------
Column: J55_a
Mean: 0.9454963659113814
Standard Deviation: 0.7915578601815897
Max: 5.99133551977937
Min: 0.285496902227754
Var: 0.6265638460152572
--------------------------------------------------
Column: S1_a
Mean: 5.072070662672618
Standard Deviation: 4.087220998241304
Max: 29.4415893863429
Min: 0.883452930509886
Var: 16.70537548846464
--------------------------------------------------
Column: S3_a
Mean: 2.6179237242153452
Standard Deviation: 2.2893472434768816
Max: 16.7919435942875
Min: 0.449099045020366
Var: 5.241110801215196
--------------------------------------------------
Column: S5_a
Mean: 3.078958803740799
Standard Deviation: 2.568470618665079
Max: 18.3687775701395
Min: 0.49711113337741
Var: 6.5970413189457755
--------------------------------------------------
Column: S11_a
Mean: 4.393513494458013
Standard Deviation: 3.3279682893894362
Max: 20.7502022793951
Min: 0.804178643837459
Var: 11.07537293518165
--------------------------------------------------
Column: S55_a
Mean: 8.218759976060985
Standard Deviation: 5.429425241182339
Max: 27.8886408329676
Min: 2.12300082346364
Var: 29.4786584495879
--------------------------------------------------
Column: DPF_a
Mean: 66.60136730583282
Standard Deviation: 12.010272254272317
Max: 87.6790830945559
Min: 26.6545784224841
Var: 144.24663962174344
--------------------------------------------------
Column: PFR_a
Mean: 0.22950795241187172
Standard Deviation: 0.2994210517717801
Max: 2.05988326586503
Min: 0.0614092277753447
Var: 0.08965296624411902
--------------------------------------------------
Column: PPE_a
Mean: 1.04610081933792
Standard Deviation: 0.663761326486491
Max: 3.39377357252711
Min: 0.0397935998137785
Var: 0.44057909853910604
--------------------------------------------------
Column: PVI_a
Mean: 0.48633739351358796
Standard Deviation: 0.44774998289264556
Max: 3.152777509126
Min: -0.0
Var: 0.20048004718036438
--------------------------------------------------
Column: HNR_a
Mean: 13.11754261828827
Standard Deviation: 5.158557315941071
Max: 23.8771239088319
Min: 1.22474104719174
Var: 26.61071358184914
--------------------------------------------------
Column: GNEa_{\mu}
Mean: 0.9056801674574759
Standard Deviation: 0.034267591654726315
Max: 0.968958874167239
Min: 0.847778548421272
Var: 0.0011742678378150685
--------------------------------------------------
Column: GNEa_{\sigma}
Mean: 0.030288750669149076
Standard Deviation: 0.009127858804112524
Max: 0.0601045491237549
Min: 0.0084854242670405
Var: 8.331780634781452e-05
--------------------------------------------------
Column: Ha(1)_{mu}
Mean: -10.918389796275394
Standard Deviation: 8.750774550325888
Max: -1.02523729551332
Min: -42.7302212787659
Var: 76.57605523063124
--------------------------------------------------
Column: Ha(2)_{mu}
Mean: -11.898157865612609
Standard Deviation: 5.971155619367993
Max: -4.27002356405569
Min: -30.0986635852088
Var: 35.654699430709954
--------------------------------------------------
Column: Ha(3)_{mu}
Mean: -13.027749772097136
Standard Deviation: 6.634671926854527
Max: -1.88584415369332
Min: -40.0069615836161
Var: 44.01887157699157
--------------------------------------------------
Column: Ha(4)_{mu}
Mean: -15.332621053473595
Standard Deviation: 8.455905570067294
Max: -1.81235734598376
Min: -46.4308820673431
Var: 71.5023390098951
--------------------------------------------------
Column: Ha(5)_{mu}
Mean: -20.211281972134486
Standard Deviation: 11.153857303180878
Max: -2.17357664958254
Min: -51.4969461495609
Var: 124.4085327397214
--------------------------------------------------
Column: Ha(6)_{mu}
Mean: -22.606453857292248
Standard Deviation: 12.314214435100542
Max: -3.34129255097787
Min: -64.8940530659436
Var: 151.63987715363857
--------------------------------------------------
Column: Ha(7)_{mu}
Mean: -27.597269376750464
Standard Deviation: 12.712163748682812
Max: -6.22010305162356
Min: -59.6414868673019
Var: 161.59910717332545
--------------------------------------------------
Column: Ha(8)_{mu}
Mean: -32.584852802140205
Standard Deviation: 13.539554443493675
Max: -5.26183857168348
Min: -64.0606439484734
Var: 183.31953452832929
--------------------------------------------------
Column: Ha(1)_{sd}
Mean: 2.4924325404369427
Standard Deviation: 2.6301112921292327
Max: 15.4170922344652
Min: 0.456430854993122
Var: 6.917485408985701
--------------------------------------------------
Column: Ha(2)_{sd}
Mean: 2.86299501480734
Standard Deviation: 2.0494753274997275
Max: 8.24580631710921
Min: 0.628063815299804
Var: 4.200349118030116
--------------------------------------------------
Column: Ha(3)_{sd}
Mean: 3.4641430013719354
Standard Deviation: 2.7575819214897352
Max: 15.1686200587276
Min: 0.673782105840455
Var: 7.60425805372702
--------------------------------------------------
Column: Ha(4)_{sd}
Mean: 3.789089322853057
Standard Deviation: 2.4103575917869717
Max: 10.0352087235906
Min: 1.08458181097138
Var: 5.80982372028509
--------------------------------------------------
Column: Ha(5)_{sd}
Mean: 4.597379057006017
Standard Deviation: 2.7349233400650723
Max: 15.5240670209037
Min: 0.901755105979975
Var: 7.47980567603269
--------------------------------------------------
Column: Ha(6)_{sd}
Mean: 4.798836466900102
Standard Deviation: 2.957814249056782
Max: 19.0559594468549
Min: 0.754808433773203
Var: 8.748665131923335
--------------------------------------------------
Column: Ha(7)_{sd}
Mean: 4.992635204732386
Standard Deviation: 3.3015583269477715
Max: 20.8839801187164
Min: 1.25072855119363
Var: 10.900287386238169
--------------------------------------------------
Column: Ha(8)_{sd}
Mean: 5.238973251316987
Standard Deviation: 2.655395398410618
Max: 15.4436524486257
Min: 1.23350033859106
Var: 7.051124721900284
--------------------------------------------------
Column: Ha(1)_{rel}
Mean: 0.13265750108780114
Standard Deviation: 0.11554086161146618
Max: 0.674914959640725
Min: 0.0195647194135768
Var: 0.01334969070191998
--------------------------------------------------
Column: Ha(2)_{rel}
Mean: 0.08498439400871834
Standard Deviation: 0.03912391137402449
Max: 0.184987225617616
Min: 0.0286255905741229
Var: 0.0015306804412025226
--------------------------------------------------
Column: Ha(3)_{rel}
Mean: 0.08004200645314209
Standard Deviation: 0.05400708580313946
Max: 0.355466617459184
Min: 0.018123959371777
Var: 0.0029167653169476677
--------------------------------------------------
Column: Ha(4)_{rel}
Mean: 0.07359893405284057
Standard Deviation: 0.056228038927270824
Max: 0.345191923551153
Min: 0.0186870767484907
Var: 0.003161592361606683
--------------------------------------------------
Column: Ha(5)_{rel}
Mean: 0.05987508437652133
Standard Deviation: 0.04879107738666688
Max: 0.283583798329672
Min: 0.0171265901741955
Var: 0.0023805692325517165
--------------------------------------------------
Column: Ha(6)_{rel}
Mean: 0.05233025283525436
Standard Deviation: 0.04254215708378476
Max: 0.229415505504976
Min: 0.0141680571417519
Var: 0.0018098351293414179
--------------------------------------------------
Column: Ha(7)_{rel}
Mean: 0.0381402459175993
Standard Deviation: 0.019359151877006125
Max: 0.100367151246796
Min: 0.0148963624373277
Var: 0.00037477676139698973
--------------------------------------------------
Column: Ha(8)_{rel}
Mean: 0.03232225660923279
Standard Deviation: 0.01894169659614182
Max: 0.137463732412042
Min: 0.0137153309359801
Var: 0.0003587878699402906
--------------------------------------------------
Column: CCa(1)
Mean: 1.1121905609616427
Standard Deviation: 4.949993221376777
Max: 12.2917747138599
Min: -12.3587760924942
Var: 24.502432891676047
--------------------------------------------------
Column: CCa(2)
Mean: -9.724182973941003
Standard Deviation: 5.553031801942787
Max: 2.57812014607364
Min: -25.4073215651635
Var: 30.83616219338795
--------------------------------------------------
Column: CCa(3)
Mean: -8.898135659514084
Standard Deviation: 6.495814907269197
Max: 4.0321351235004
Min: -25.9796004012163
Var: 42.19561130950073
--------------------------------------------------
Column: CCa(4)
Mean: -2.717699172526518
Standard Deviation: 6.675439731397148
Max: 15.3537936386388
Min: -18.5663528157525
Var: 44.561495607515624
--------------------------------------------------
Column: CCa(5)
Mean: -9.280586668507024
Standard Deviation: 8.312616528402945
Max: 17.1238445939678
Min: -27.3351022716619
Var: 69.09959354827782
--------------------------------------------------
Column: CCa(6)
Mean: -1.068055026938378
Standard Deviation: 7.390385524488313
Max: 15.6355280858561
Min: -20.0699436111426
Var: 54.617798200566405
--------------------------------------------------
Column: CCa(7)
Mean: -3.2801734129252536
Standard Deviation: 6.298097866238561
Max: 17.0931348771196
Min: -18.2747015228283
Var: 39.666036732718716
--------------------------------------------------
Column: CCa(8)
Mean: -4.366733226819115
Standard Deviation: 10.051911699315342
Max: 20.1330539137104
Min: -23.105108657258
Var: 101.04092881083265
--------------------------------------------------
Column: CCa(9)
Mean: -9.386150474969893
Standard Deviation: 6.792950491165196
Max: 16.6454609819757
Min: -25.843250178978
Var: 46.14417637542147
--------------------------------------------------
Column: CCa(10)
Mean: -5.815643068210756
Standard Deviation: 6.6461210337497
Max: 16.8582063590473
Min: -18.8940787223355
Var: 44.17092479525018
--------------------------------------------------
Column: CCa(11)
Mean: 0.08758968092139799
Standard Deviation: 7.287971843554155
Max: 28.7979477874746
Min: -13.47154437876
Var: 53.11453359243816
--------------------------------------------------
Column: CCa(12)
Mean: -1.9915715915891292
Standard Deviation: 6.61907039060938
Max: 19.3498288831846
Min: -14.2630022613835
Var: 43.81209283584182
--------------------------------------------------
Column: dCCa(1)
Mean: 0.001382954759202585
Standard Deviation: 0.013686810687317603
Max: 0.0562197465208467
Min: -0.0388791350237649
Var: 0.00018732878679047135
--------------------------------------------------
Column: dCCa(2)
Mean: 0.0076527818262686325
Standard Deviation: 0.01839895758985901
Max: 0.0687695697918272
Min: -0.0159711482044381
Var: 0.0003385216403934305
--------------------------------------------------
Column: dCCa(3)
Mean: 0.0008137051752666842
Standard Deviation: 0.01577443139218938
Max: 0.0274413869154998
Min: -0.0611631000227483
Var: 0.0002488326857468898
--------------------------------------------------
Column: dCCa(4)
Mean: -0.0016348086025046267
Standard Deviation: 0.018044798499730463
Max: 0.0389936640207402
Min: -0.0561977757601556
Var: 0.0003256147528958747
--------------------------------------------------
Column: dCCa(5)
Mean: -0.002202510461326893
Standard Deviation: 0.02767145053959421
Max: 0.0712920913999485
Min: -0.140435284232214
Var: 0.0007657091749652087
--------------------------------------------------
Column: dCCa(6)
Mean: 0.0018610229445092667
Standard Deviation: 0.02010253628312101
Max: 0.0536857974178037
Min: -0.0488007460084803
Var: 0.00040411196501419667
--------------------------------------------------
Column: dCCa(7)
Mean: 0.004432238927951802
Standard Deviation: 0.02129172122862291
Max: 0.0754125459017925
Min: -0.0428794013721995
Var: 0.00045333739287739137
--------------------------------------------------
Column: dCCa(8)
Mean: 0.0006500342763628977
Standard Deviation: 0.026354421108471793
Max: 0.148294367935822
Min: -0.0549806751736176
Var: 0.0006945555119626637
--------------------------------------------------
Column: dCCa(9)
Mean: 0.0011826148117677238
Standard Deviation: 0.025877709548438717
Max: 0.0792218341030567
Min: -0.092013581142057
Var: 0.0006696558514733564
--------------------------------------------------
Column: dCCa(10)
Mean: 0.0028273042884651477
Standard Deviation: 0.020172363491495836
Max: 0.0897900270349725
Min: -0.0490835843082015
Var: 0.00040692424883303406
--------------------------------------------------
Column: dCCa(11)
Mean: 0.0008351569383335656
Standard Deviation: 0.0228130794368141
Max: 0.0696827319084076
Min: -0.0603578451111036
Var: 0.0005204365933903903
--------------------------------------------------
Column: dCCa(12)
Mean: -0.00042300580950935577
Standard Deviation: 0.027344595434515003
Max: 0.0846943139702484
Min: -0.105210256261341
Var: 0.0007477268994772987
--------------------------------------------------
Column: J1_i
Mean: 0.5604972902107235
Standard Deviation: 0.4677865299222095
Max: 2.54574974297934
Min: 0.124382709607886
Var: 0.2188242375766622
--------------------------------------------------
Column: J3_i
Mean: 0.32211696508283766
Standard Deviation: 0.2936920901539547
Max: 1.53583002017611
Min: 0.063500096867429
Var: 0.08625504381899865
--------------------------------------------------
Column: J5_i
Mean: 0.3259531001300733
Standard Deviation: 0.23423841148021868
Max: 1.26977165757309
Min: 0.107823935317913
Var: 0.05486763341277624
--------------------------------------------------
Column: J55_i
Mean: 0.7887940005128145
Standard Deviation: 0.5323663841071605
Max: 3.00895758879809
Min: 0.270428744229768
Var: 0.28341396692733273
--------------------------------------------------
Column: S1_i
Mean: 3.428250895630246
Standard Deviation: 2.0717580091471284
Max: 9.8757130009375
Min: 0.85109505271316
Var: 4.2921812484652735
--------------------------------------------------
Column: S3_i
Mean: 1.7487684640968078
Standard Deviation: 1.1536607414763118
Max: 5.03562066564665
Min: 0.437936732853038
Var: 1.3309331064236736
--------------------------------------------------
Column: S5_i
Mean: 2.04150931066711
Standard Deviation: 1.269170715197415
Max: 6.15231885044359
Min: 0.462263216331383
Var: 1.6107943043147177
--------------------------------------------------
Column: S11_i
Mean: 2.894741527244938
Standard Deviation: 1.6783774447194408
Max: 8.43105387693632
Min: 0.575181928238406
Var: 2.81695084694296
--------------------------------------------------
Column: S55_i
Mean: 6.101996131551487
Standard Deviation: 3.2018254261739543
Max: 16.1666335981014
Min: 1.90147943006464
Var: 10.251686059694025
--------------------------------------------------
Column: DPF_i
Mean: 65.13435832614583
Standard Deviation: 12.896304583578306
Max: 86.4864864864865
Min: 30.8835672997523
Var: 166.31467191242282
--------------------------------------------------
Column: PFR_i
Mean: 0.20736610708010947
Standard Deviation: 0.19797235028045063
Max: 1.1230817546142
Min: 0.0613346721225932
Var: 0.03919305147556544
--------------------------------------------------
Column: PPE_i
Mean: 1.2505767241591745
Standard Deviation: 0.6377994671119896
Max: 3.22205694616239
Min: 0.142582177534859
Var: 0.406788160248338
--------------------------------------------------
Column: PVI_i
Mean: 0.516292916208627
Standard Deviation: 0.515401293055496
Max: 3.01306679375731
Min: -0.0
Var: 0.26563849288327723
--------------------------------------------------
Column: HNR_i
Mean: 19.609512607806323
Standard Deviation: 4.9312672149769
Max: 29.0340710410429
Min: 6.83156778933749
Var: 24.317396345506033
--------------------------------------------------
Column: GNEi_{\mu}
Mean: 0.8980164404225391
Standard Deviation: 0.03276622052047653
Max: 0.97685205701766
Min: 0.843636170166613
Var: 0.001073625207196497
--------------------------------------------------
Column: GNEi_{\sigma}
Mean: 0.02891886026416772
Standard Deviation: 0.006668838808495691
Max: 0.0413542210284205
Min: 0.0079383460373362
Var: 4.447341105369823e-05
--------------------------------------------------
Column: Hi(1)_{mu}
Mean: -10.171170071618485
Standard Deviation: 10.59135936953954
Max: -1.6123241034975
Min: -48.9008369794071
Var: 112.17689329473299
--------------------------------------------------
Column: Hi(2)_{mu}
Mean: -10.917329242937706
Standard Deviation: 8.453458552292123
Max: -1.23166184165386
Min: -35.7961652939104
Var: 71.46096149532082
--------------------------------------------------
Column: Hi(3)_{mu}
Mean: -25.73291393462567
Standard Deviation: 15.347472820276503
Max: -1.84670381969273
Min: -71.0776600359972
Var: 235.54492196912597
--------------------------------------------------
Column: Hi(4)_{mu}
Mean: -36.913112508500554
Standard Deviation: 17.009739134555
Max: -3.76100753736233
Min: -68.4671961331809
Var: 289.331225425612
--------------------------------------------------
Column: Hi(5)_{mu}
Mean: -46.558202854723596
Standard Deviation: 14.639661938976184
Max: -11.0536388959591
Min: -74.1226599560466
Var: 214.31970168750792
--------------------------------------------------
Column: Hi(6)_{mu}
Mean: -49.65970962021661
Standard Deviation: 13.84487289300312
Max: -5.29000422636931
Min: -73.8368160123499
Var: 191.6805054234126
--------------------------------------------------
Column: Hi(7)_{mu}
Mean: -52.49458041059174
Standard Deviation: 11.834121359166746
Max: -11.8895881558621
Min: -73.2330156125233
Var: 140.04642834348658
--------------------------------------------------
Column: Hi(8)_{mu}
Mean: -53.026724461458734
Standard Deviation: 12.602194004332926
Max: -14.7268388273915
Min: -76.7677744664689
Var: 158.81529372284473
--------------------------------------------------
Column: Hi(1)_{sd}
Mean: 2.4278352275918866
Standard Deviation: 2.30551593881782
Max: 11.9729344550696
Min: 0.388797010213913
Var: 5.3154037441430155
--------------------------------------------------
Column: Hi(2)_{sd}
Mean: 2.958613822314677
Standard Deviation: 2.5703429688325587
Max: 13.1298096167449
Min: 0.573949129866831
Var: 6.606662977426973
--------------------------------------------------
Column: Hi(3)_{sd}
Mean: 3.7475815752498334
Standard Deviation: 2.4976635388917803
Max: 14.2658139827342
Min: 0.899958987140613
Var: 6.238323153509412
--------------------------------------------------
Column: Hi(4)_{sd}
Mean: 4.029022933184554
Standard Deviation: 2.2850899902864814
Max: 9.934408710848
Min: 0.647605098022009
Var: 5.221636263707472
--------------------------------------------------
Column: Hi(5)_{sd}
Mean: 4.648561980089846
Standard Deviation: 2.267330598392807
Max: 13.0645308884366
Min: 0.809010640808776
Var: 5.140788042408285
--------------------------------------------------
Column: Hi(6)_{sd}
Mean: 4.8027824497096905
Standard Deviation: 2.0776786409211763
Max: 9.52645385682456
Min: 1.12269830426427
Var: 4.316748534940066
--------------------------------------------------
Column: Hi(7)_{sd}
Mean: 5.2634855107732275
Standard Deviation: 2.1464844058163783
Max: 11.968620375951
Min: 1.34866330979525
Var: 4.60739530441289
--------------------------------------------------
Column: Hi(8)_{sd}
Mean: 5.224679280549857
Standard Deviation: 2.168108949508015
Max: 11.1326713190622
Min: 1.8687080560454
Var: 4.700696416936749
--------------------------------------------------
Column: Hi(1)_{rel}
Mean: 0.15205975398202073
Standard Deviation: 0.11088728740013579
Max: 0.416235733630038
Min: 0.0181452927589843
Var: 0.012295990506960312
--------------------------------------------------
Column: Hi(2)_{rel}
Mean: 0.12273679460895721
Standard Deviation: 0.09690976024069513
Max: 0.47120073818453
Min: 0.0233400697961505
Var: 0.009391501629909016
--------------------------------------------------
Column: Hi(3)_{rel}
Mean: 0.05892235693997809
Standard Deviation: 0.06473114571676598
Max: 0.36407818153438
Min: 0.0130203933606143
Var: 0.00419012122580519
--------------------------------------------------
Column: Hi(4)_{rel}
Mean: 0.035004429931756904
Standard Deviation: 0.03149241922593493
Max: 0.174463150055721
Min: 0.0129178399821179
Var: 0.000991772468702036
--------------------------------------------------
Column: Hi(5)_{rel}
Mean: 0.02214737872770327
Standard Deviation: 0.009766908998302017
Max: 0.0718874855529159
Min: 0.0124761518420045
Var: 9.53925113811129e-05
--------------------------------------------------
Column: Hi(6)_{rel}
Mean: 0.02133538836006788
Standard Deviation: 0.014629121713532858
Max: 0.121484894078625
Min: 0.0124705884941843
Var: 0.00021401120210935855
--------------------------------------------------
Column: Hi(7)_{rel}
Mean: 0.01859028886198358
Standard Deviation: 0.006997438790482036
Max: 0.0603290347732484
Min: 0.0123648174689675
Var: 4.896414962654269e-05
--------------------------------------------------
Column: Hi(8)_{rel}
Mean: 0.018504326504890412
Standard Deviation: 0.006555775759198389
Max: 0.0540434345491743
Min: 0.012195376364715
Var: 4.2978195804893215e-05
--------------------------------------------------
Column: CCi(1)
Mean: -0.03681474942688663
Standard Deviation: 4.756599529494893
Max: 10.7989006470902
Min: -12.2609040135642
Var: 22.625239083991033
--------------------------------------------------
Column: CCi(2)
Mean: 12.668709484671437
Standard Deviation: 8.580686864222983
Max: 26.2731092461923
Min: -14.8975515227695
Var: 73.62818706184883
--------------------------------------------------
Column: CCi(3)
Mean: -5.886748430956232
Standard Deviation: 8.27866857812091
Max: 8.3067796957193
Min: -22.9769853579478
Var: 68.53635342636652
--------------------------------------------------
Column: CCi(4)
Mean: -16.331894916287037
Standard Deviation: 7.932550333030245
Max: 13.3814060548556
Min: -31.3288578588504
Var: 62.92535478605825
--------------------------------------------------
Column: CCi(5)
Mean: -10.861020784556386
Standard Deviation: 7.211648416847074
Max: 6.28960228754939
Min: -23.6769493827959
Var: 52.0078728882129
--------------------------------------------------
Column: CCi(6)
Mean: -7.65742962711239
Standard Deviation: 8.095678597262246
Max: 8.93262955204458
Min: -21.7832948089145
Var: 65.54001195017001
--------------------------------------------------
Column: CCi(7)
Mean: -8.921400737277457
Standard Deviation: 6.694698184456786
Max: 5.74506869738599
Min: -30.7254921869464
Var: 44.81898378096898
--------------------------------------------------
Column: CCi(8)
Mean: -3.588996697428346
Standard Deviation: 7.657291967775357
Max: 13.1291325623703
Min: -26.1902001586054
Var: 58.634120279757
--------------------------------------------------
Column: CCi(9)
Mean: -4.736833518756158
Standard Deviation: 7.484008186103914
Max: 17.8393830825827
Min: -20.145785639623
Var: 56.0103785296704
--------------------------------------------------
Column: CCi(10)
Mean: -5.528360754375791
Standard Deviation: 6.979685584065822
Max: 17.6170866115972
Min: -17.4591314170075
Var: 48.71601085241626
--------------------------------------------------
Column: CCi(11)
Mean: -0.48551152452437424
Standard Deviation: 8.371665111227859
Max: 20.1472796194926
Min: -15.7302768628524
Var: 70.08477673454975
--------------------------------------------------
Column: CCi(12)
Mean: -2.818272171557788
Standard Deviation: 7.8423688402829566
Max: 16.9284282530435
Min: -21.5918240288464
Var: 61.50274902704104
--------------------------------------------------
Column: dCCi(1)
Mean: 0.0036140233188376282
Standard Deviation: 0.012212330844588067
Max: 0.0568569111568067
Min: -0.0242549836971201
Var: 0.0001491410246576771
--------------------------------------------------
Column: dCCi(2)
Mean: -0.006828938085752231
Standard Deviation: 0.018187520588793707
Max: 0.0366060445292327
Min: -0.072591244327061
Var: 0.000330785905167795
--------------------------------------------------
Column: dCCi(3)
Mean: 0.004692481423131148
Standard Deviation: 0.017865364169368656
Max: 0.0687304279644546
Min: -0.0606761961658655
Var: 0.0003191712369041615
--------------------------------------------------
Column: dCCi(4)
Mean: -0.0056059722776925875
Standard Deviation: 0.019439075396967855
Max: 0.0514523078774652
Min: -0.0576347404331426
Var: 0.00037787765228900096
--------------------------------------------------
Column: dCCi(5)
Mean: 0.005055228539628075
Standard Deviation: 0.01819293361150992
Max: 0.0588495419869384
Min: -0.0660041917603545
Var: 0.0003309828333928074
--------------------------------------------------
Column: dCCi(6)
Mean: 0.0010846481326639028
Standard Deviation: 0.021640629742471315
Max: 0.0316242242612357
Min: -0.0728282781162606
Var: 0.00046831685565073406
--------------------------------------------------
Column: dCCi(7)
Mean: 0.0033927843187008255
Standard Deviation: 0.033267506223185535
Max: 0.220532793164975
Min: -0.0520018738969869
Var: 0.0011067269703096882
--------------------------------------------------
Column: dCCi(8)
Mean: 0.006224109568974981
Standard Deviation: 0.024670026432084005
Max: 0.0897656349030549
Min: -0.0692019476960927
Var: 0.0006086102041597234
--------------------------------------------------
Column: dCCi(9)
Mean: -0.0028885401807108857
Standard Deviation: 0.02831525762819393
Max: 0.0803366866296069
Min: -0.120838233459257
Var: 0.0008017538145509947
--------------------------------------------------
Column: dCCi(10)
Mean: -0.0021518296735254633
Standard Deviation: 0.019542196223942015
Max: 0.0573029885696565
Min: -0.0657350124404751
Var: 0.0003818974332550536
--------------------------------------------------
Column: dCCi(11)
Mean: -0.0019687410740259377
Standard Deviation: 0.01801151082040923
Max: 0.061026390026761
Min: -0.0429554525049006
Var: 0.0003244145220337188
--------------------------------------------------
Column: dCCi(12)
Mean: 0.0012688797448391893
Standard Deviation: 0.020799686929897636
Max: 0.0778972293782146
Min: -0.0839773697130102
Var: 0.0004326269763817546
--------------------------------------------------
Column: d_1
Mean: 9.164472684963322
Standard Deviation: 2.6814486649289866
Max: 15.4207766781969
Min: 2.27670168162266
Var: 7.190166942649444
--------------------------------------------------
Column: F2_i
Mean: 2495.116475499477
Standard Deviation: 617.7558556972639
Max: 3599.55439382624
Min: 444.730268116722
Var: 381622.2972482587
--------------------------------------------------
Column: F2_{conv}
Mean: 1209.9764046384807
Standard Deviation: 553.6940461956145
Max: 2441.21905442786
Min: 48.2462034430127
Var: 306577.09679247136
--------------------------------------------------
Column: Diagnosis (ALS)
Mean: 0.484375
Standard Deviation: 0.503706499953334
Max: 1
Min: 0
Var: 0.2537202380952381
--------------------------------------------------
percentiles_25 = {}
percentiles_50 = {}
percentiles_75 = {}
# Calculate statistics for each column
for i in data.columns:
percentiles_25[i] = data[i].quantile(0.25)
percentiles_50[i] = data[i].quantile(0.50)
percentiles_75[i] = data[i].quantile(0.75)
print(f"Column: {i}")
print(f"25th percentile: {percentiles_25[i]}")
print(f"50th percentile: {percentiles_50[i]}")
print(f"75th percentile: {percentiles_75[i]}")
print('------'*10)
Column: ID
25th percentile: 31.75
50th percentile: 66.5
75th percentile: 98.25
------------------------------------------------------------
Column: Sex
25th percentile: 0.0
50th percentile: 1.0
75th percentile: 1.0
------------------------------------------------------------
Column: Age
25th percentile: 50.75
50th percentile: 58.0
75th percentile: 63.25
------------------------------------------------------------
Column: J1_a
25th percentile: 0.325932212785935
50th percentile: 0.458934690690478
75th percentile: 0.7727828083997907
------------------------------------------------------------
Column: J3_a
25th percentile: 0.17242193306070952
50th percentile: 0.253975529337377
75th percentile: 0.465698958212338
------------------------------------------------------------
Column: J5_a
25th percentile: 0.19827438018164376
50th percentile: 0.29340494115155247
75th percentile: 0.47654100894346874
------------------------------------------------------------
Column: J55_a
25th percentile: 0.5383869803782271
50th percentile: 0.6981825444535985
75th percentile: 1.1890253510143725
------------------------------------------------------------
Column: S1_a
25th percentile: 2.64182962293309
50th percentile: 4.19848642131325
75th percentile: 6.259731337398078
------------------------------------------------------------
Column: S3_a
25th percentile: 1.36944605357487
50th percentile: 1.966045392147405
75th percentile: 3.2581840592869376
------------------------------------------------------------
Column: S5_a
25th percentile: 1.508064265817355
50th percentile: 2.65366648046679
75th percentile: 3.8015044583924174
------------------------------------------------------------
Column: S11_a
25th percentile: 2.1237609699215025
50th percentile: 3.63499441394943
75th percentile: 5.644808423124029
------------------------------------------------------------
Column: S55_a
25th percentile: 4.425068174740881
50th percentile: 6.46525534079523
75th percentile: 10.350968176784725
------------------------------------------------------------
Column: DPF_a
25th percentile: 60.15591401152575
50th percentile: 68.00716518103894
75th percentile: 76.62763978553456
------------------------------------------------------------
Column: PFR_a
25th percentile: 0.10552923004441075
50th percentile: 0.157785981277095
75th percentile: 0.253424120400572
------------------------------------------------------------
Column: PPE_a
25th percentile: 0.454098617738357
50th percentile: 0.977585138664433
75th percentile: 1.401583064808
------------------------------------------------------------
Column: PVI_a
25th percentile: 0.24778532955392202
50th percentile: 0.41838044928998996
75th percentile: 0.5509138050214244
------------------------------------------------------------
Column: HNR_a
25th percentile: 9.35662836648995
50th percentile: 12.880039281547301
75th percentile: 16.415745943934525
------------------------------------------------------------
Column: GNEa_{\mu}
25th percentile: 0.8753948310949548
50th percentile: 0.9052571130863696
75th percentile: 0.9316980340181847
------------------------------------------------------------
Column: GNEa_{\sigma}
25th percentile: 0.025686788305854826
50th percentile: 0.0310084870124
75th percentile: 0.03561833117145765
------------------------------------------------------------
Column: Ha(1)_{mu}
25th percentile: -14.231224955880075
50th percentile: -8.35935252117335
75th percentile: -4.273960221432798
------------------------------------------------------------
Column: Ha(2)_{mu}
25th percentile: -15.630161402294274
50th percentile: -10.3423065967396
75th percentile: -7.129745148695503
------------------------------------------------------------
Column: Ha(3)_{mu}
25th percentile: -16.5393741406053
50th percentile: -13.14197042458165
75th percentile: -8.372756404885452
------------------------------------------------------------
Column: Ha(4)_{mu}
25th percentile: -19.82266208050395
50th percentile: -14.034719648193551
75th percentile: -10.502018298339674
------------------------------------------------------------
Column: Ha(5)_{mu}
25th percentile: -28.520342636844077
50th percentile: -18.11069510681055
75th percentile: -12.258674852541375
------------------------------------------------------------
Column: Ha(6)_{mu}
25th percentile: -29.712325223814325
50th percentile: -21.711106352034548
75th percentile: -14.37830370481765
------------------------------------------------------------
Column: Ha(7)_{mu}
25th percentile: -33.44501282594473
50th percentile: -26.6856543647814
75th percentile: -17.330045525550872
------------------------------------------------------------
Column: Ha(8)_{mu}
25th percentile: -40.1478603985322
50th percentile: -30.0761793433272
75th percentile: -25.09165257978905
------------------------------------------------------------
Column: Ha(1)_{sd}
25th percentile: 0.9634092381783262
50th percentile: 1.435627714163515
75th percentile: 3.3586359078220527
------------------------------------------------------------
Column: Ha(2)_{sd}
25th percentile: 1.3541348550365977
50th percentile: 2.1610096881573204
75th percentile: 3.896733774094365
------------------------------------------------------------
Column: Ha(3)_{sd}
25th percentile: 1.7009920269378527
50th percentile: 2.6219531385459547
75th percentile: 3.9103795992219075
------------------------------------------------------------
Column: Ha(4)_{sd}
25th percentile: 1.9461853288964326
50th percentile: 2.988522177143105
75th percentile: 4.979344316616983
------------------------------------------------------------
Column: Ha(5)_{sd}
25th percentile: 2.42851248952423
50th percentile: 4.14654667456941
75th percentile: 6.362348692319035
------------------------------------------------------------
Column: Ha(6)_{sd}
25th percentile: 2.718376980715
50th percentile: 4.30367055540295
75th percentile: 6.2423375033158175
------------------------------------------------------------
Column: Ha(7)_{sd}
25th percentile: 2.6144649171345202
50th percentile: 3.8708026394941353
75th percentile: 6.50906829601836
------------------------------------------------------------
Column: Ha(8)_{sd}
25th percentile: 3.3050023766216725
50th percentile: 5.007648124611375
75th percentile: 7.090947028568673
------------------------------------------------------------
Column: Ha(1)_{rel}
25th percentile: 0.0585155949519144
50th percentile: 0.0997119788674579
75th percentile: 0.18036465293824
------------------------------------------------------------
Column: Ha(2)_{rel}
25th percentile: 0.05406167769680742
50th percentile: 0.07958688209849246
75th percentile: 0.11483918003935925
------------------------------------------------------------
Column: Ha(3)_{rel}
25th percentile: 0.049947252427341146
50th percentile: 0.0634977234499431
75th percentile: 0.09257261307822318
------------------------------------------------------------
Column: Ha(4)_{rel}
25th percentile: 0.042200883354431
50th percentile: 0.05697333885746845
75th percentile: 0.07975841345341134
------------------------------------------------------------
Column: Ha(5)_{rel}
25th percentile: 0.027691920944120225
50th percentile: 0.0444021045405419
75th percentile: 0.06703624147214945
------------------------------------------------------------
Column: Ha(6)_{rel}
25th percentile: 0.02739523339417915
50th percentile: 0.041349073494446095
75th percentile: 0.054670461332237574
------------------------------------------------------------
Column: Ha(7)_{rel}
25th percentile: 0.024661186091498602
50th percentile: 0.0330993785249601
75th percentile: 0.044613527454857194
------------------------------------------------------------
Column: Ha(8)_{rel}
25th percentile: 0.02193061916684545
50th percentile: 0.029766968681663
75th percentile: 0.033603019628248
------------------------------------------------------------
Column: CCa(1)
25th percentile: -2.39954996838877
50th percentile: 0.8120446345862056
75th percentile: 4.101239598353993
------------------------------------------------------------
Column: CCa(2)
25th percentile: -13.3350153555612
50th percentile: -9.32205173618002
75th percentile: -6.90195792252087
------------------------------------------------------------
Column: CCa(3)
25th percentile: -13.5427854963858
50th percentile: -8.09705591885503
75th percentile: -5.20825304808952
------------------------------------------------------------
Column: CCa(4)
25th percentile: -6.435699464157643
50th percentile: -3.08783086583838
75th percentile: 2.2303691281043827
------------------------------------------------------------
Column: CCa(5)
25th percentile: -14.176765756826574
50th percentile: -9.96122952035788
75th percentile: -5.185297675292488
------------------------------------------------------------
Column: CCa(6)
25th percentile: -5.86527433257598
50th percentile: -2.38783199387617
75th percentile: 4.870071504791695
------------------------------------------------------------
Column: CCa(7)
25th percentile: -7.793801064498022
50th percentile: -2.96863083577458
75th percentile: 0.28366292179407676
------------------------------------------------------------
Column: CCa(8)
25th percentile: -11.985285024946576
50th percentile: -3.6237166651284998
75th percentile: 2.4546844617393853
------------------------------------------------------------
Column: CCa(9)
25th percentile: -14.332659115127875
50th percentile: -9.67330155148145
75th percentile: -6.368085628208795
------------------------------------------------------------
Column: CCa(10)
25th percentile: -10.248713320033975
50th percentile: -6.80810082751285
75th percentile: -2.2375457684360724
------------------------------------------------------------
Column: CCa(11)
25th percentile: -3.9479222276294275
50th percentile: -0.17363337731558098
75th percentile: 3.569335480096515
------------------------------------------------------------
Column: CCa(12)
25th percentile: -7.029761112787112
50th percentile: -2.56040820246236
75th percentile: 1.769206875225335
------------------------------------------------------------
Column: dCCa(1)
25th percentile: -0.00257184342303265
50th percentile: 0.0013593896801524
75th percentile: 0.0047825222459437
------------------------------------------------------------
Column: dCCa(2)
25th percentile: -0.003071332341382575
50th percentile: 0.0018820322466810498
75th percentile: 0.009408607754847975
------------------------------------------------------------
Column: dCCa(3)
25th percentile: -0.007733629744937175
50th percentile: 0.0025381803714314
75th percentile: 0.009450404081392425
------------------------------------------------------------
Column: dCCa(4)
25th percentile: -0.013452182415116625
50th percentile: 0.0021665622757974998
75th percentile: 0.008980865221360775
------------------------------------------------------------
Column: dCCa(5)
25th percentile: -0.01424902154829445
50th percentile: -0.0028467621848403003
75th percentile: 0.007559349461821
------------------------------------------------------------
Column: dCCa(6)
25th percentile: -0.009356640345190525
50th percentile: 0.0002846530366578015
75th percentile: 0.012157982821948875
------------------------------------------------------------
Column: dCCa(7)
25th percentile: -0.009404712588274824
50th percentile: 0.0002720147648211
75th percentile: 0.016620314400736323
------------------------------------------------------------
Column: dCCa(8)
25th percentile: -0.00947778567445375
50th percentile: -0.00028675110839305
75th percentile: 0.010033658684928075
------------------------------------------------------------
Column: dCCa(9)
25th percentile: -0.005752796165757525
50th percentile: 0.00107466442937245
75th percentile: 0.012329572001504675
------------------------------------------------------------
Column: dCCa(10)
25th percentile: -0.0063323209393362
50th percentile: 0.0008211382892811001
75th percentile: 0.009552092209054574
------------------------------------------------------------
Column: dCCa(11)
25th percentile: -0.010918244048472251
50th percentile: -0.00216183012278145
75th percentile: 0.011213763766791776
------------------------------------------------------------
Column: dCCa(12)
25th percentile: -0.01451867396946865
50th percentile: -0.000695255207532475
75th percentile: 0.009295785908126375
------------------------------------------------------------
Column: J1_i
25th percentile: 0.27266734353801825
50th percentile: 0.409592665633141
75th percentile: 0.6608057624880898
------------------------------------------------------------
Column: J3_i
25th percentile: 0.13155723401397548
50th percentile: 0.239542352443969
75th percentile: 0.36825103480391674
------------------------------------------------------------
Column: J5_i
25th percentile: 0.1790028720991715
50th percentile: 0.250096357259676
75th percentile: 0.39038884017474224
------------------------------------------------------------
Column: J55_i
25th percentile: 0.4399317102875772
50th percentile: 0.65217639717526
75th percentile: 0.9339753805871527
------------------------------------------------------------
Column: S1_i
25th percentile: 1.8798760361809574
50th percentile: 3.038640359546985
75th percentile: 4.258364666010605
------------------------------------------------------------
Column: S3_i
25th percentile: 0.8210334308023168
50th percentile: 1.501306072190735
75th percentile: 2.22790804377745
------------------------------------------------------------
Column: S5_i
25th percentile: 1.061090425701525
50th percentile: 1.741859041268605
75th percentile: 2.5863687873788925
------------------------------------------------------------
Column: S11_i
25th percentile: 1.6964555146544775
50th percentile: 2.762957778780125
75th percentile: 3.6805315432868175
------------------------------------------------------------
Column: S55_i
25th percentile: 3.8646628520491424
50th percentile: 5.664012633667475
75th percentile: 7.2850739804282245
------------------------------------------------------------
Column: DPF_i
25th percentile: 57.38114444820317
50th percentile: 66.3056486654252
75th percentile: 74.47718995591337
------------------------------------------------------------
Column: PFR_i
25th percentile: 0.09449339722271746
50th percentile: 0.153203222692541
75th percentile: 0.271037682274131
------------------------------------------------------------
Column: PPE_i
25th percentile: 0.8376680256099143
50th percentile: 1.1108049886920601
75th percentile: 1.648538532384185
------------------------------------------------------------
Column: PVI_i
25th percentile: 0.25335352504673153
50th percentile: 0.345564494313491
75th percentile: 0.5974841529829752
------------------------------------------------------------
Column: HNR_i
25th percentile: 16.5025463108473
50th percentile: 19.6455688390174
75th percentile: 23.536992380870828
------------------------------------------------------------
Column: GNEi_{\mu}
25th percentile: 0.8735582272273588
50th percentile: 0.8935926491051875
75th percentile: 0.9239990701883013
------------------------------------------------------------
Column: GNEi_{\sigma}
25th percentile: 0.026548225345923625
50th percentile: 0.03013394793714435
75th percentile: 0.032731181223993974
------------------------------------------------------------
Column: Hi(1)_{mu}
25th percentile: -12.084484540985224
50th percentile: -6.448450405224936
75th percentile: -3.384795779815543
------------------------------------------------------------
Column: Hi(2)_{mu}
25th percentile: -13.653747122357675
50th percentile: -7.731010481295515
75th percentile: -4.79325676128857
------------------------------------------------------------
Column: Hi(3)_{mu}
25th percentile: -33.8099473511083
50th percentile: -24.31117035262465
75th percentile: -15.963307046846499
------------------------------------------------------------
Column: Hi(4)_{mu}
25th percentile: -51.497085063213824
50th percentile: -38.7282462994452
75th percentile: -23.792347778141576
------------------------------------------------------------
Column: Hi(5)_{mu}
25th percentile: -56.29215173407705
50th percentile: -49.023876642299996
75th percentile: -33.27537900299963
------------------------------------------------------------
Column: Hi(6)_{mu}
25th percentile: -60.1565064664372
50th percentile: -51.8678002938737
75th percentile: -40.22771232615655
------------------------------------------------------------
Column: Hi(7)_{mu}
25th percentile: -60.19695609560973
50th percentile: -52.61817584350215
75th percentile: -46.0223392040385
------------------------------------------------------------
Column: Hi(8)_{mu}
25th percentile: -61.624319249837654
50th percentile: -53.78321737363075
75th percentile: -47.21013297204985
------------------------------------------------------------
Column: Hi(1)_{sd}
25th percentile: 0.9778358060194745
50th percentile: 1.478875219411755
75th percentile: 2.8274001553729926
------------------------------------------------------------
Column: Hi(2)_{sd}
25th percentile: 1.2664178055371025
50th percentile: 1.993862413478575
75th percentile: 3.8654780727618476
------------------------------------------------------------
Column: Hi(3)_{sd}
25th percentile: 1.7966097560226
50th percentile: 2.8937174183351653
75th percentile: 5.3856838565503775
------------------------------------------------------------
Column: Hi(4)_{sd}
25th percentile: 1.9599379189995374
50th percentile: 3.60069005646755
75th percentile: 5.909224825130121
------------------------------------------------------------
Column: Hi(5)_{sd}
25th percentile: 2.759132047458553
50th percentile: 4.904823335455495
75th percentile: 6.239803533936727
------------------------------------------------------------
Column: Hi(6)_{sd}
25th percentile: 3.431319730673793
50th percentile: 5.059508548367075
75th percentile: 6.132833259067275
------------------------------------------------------------
Column: Hi(7)_{sd}
25th percentile: 3.547628975884135
50th percentile: 5.230949703686726
75th percentile: 6.1056840955266996
------------------------------------------------------------
Column: Hi(8)_{sd}
25th percentile: 3.4311708106298324
50th percentile: 5.354842795336035
75th percentile: 6.409140629784815
------------------------------------------------------------
Column: Hi(1)_{rel}
25th percentile: 0.06281818901579318
50th percentile: 0.1143873113489965
75th percentile: 0.210213284488582
------------------------------------------------------------
Column: Hi(2)_{rel}
25th percentile: 0.051391951772483374
50th percentile: 0.1053242656634035
75th percentile: 0.15123312837977027
------------------------------------------------------------
Column: Hi(3)_{rel}
25th percentile: 0.0266450703634055
50th percentile: 0.035653456349457296
75th percentile: 0.05366315776977047
------------------------------------------------------------
Column: Hi(4)_{rel}
25th percentile: 0.01786372376492465
50th percentile: 0.02387658387706415
75th percentile: 0.03703348118283285
------------------------------------------------------------
Column: Hi(5)_{rel}
25th percentile: 0.015986048774129926
50th percentile: 0.0190254233578682
75th percentile: 0.026545681004683377
------------------------------------------------------------
Column: Hi(6)_{rel}
25th percentile: 0.015163494272782348
50th percentile: 0.017316686664040598
75th percentile: 0.022451171850427977
------------------------------------------------------------
Column: Hi(7)_{rel}
25th percentile: 0.0151356729620395
50th percentile: 0.0172237182123486
75th percentile: 0.019832252469677028
------------------------------------------------------------
Column: Hi(8)_{rel}
25th percentile: 0.01475417592078155
50th percentile: 0.017086554806409998
75th percentile: 0.01982734387646465
------------------------------------------------------------
Column: CCi(1)
25th percentile: -3.2860815264595176
50th percentile: -0.214981618056296
75th percentile: 3.5806901783547125
------------------------------------------------------------
Column: CCi(2)
25th percentile: 8.459895098526498
50th percentile: 14.9648265736674
75th percentile: 18.525066760286276
------------------------------------------------------------
Column: CCi(3)
25th percentile: -10.988101302162626
50th percentile: -7.0211352388377
75th percentile: 1.9682239276501452
------------------------------------------------------------
Column: CCi(4)
25th percentile: -22.068165891934825
50th percentile: -15.20291899790905
75th percentile: -12.892236700689924
------------------------------------------------------------
Column: CCi(5)
25th percentile: -15.78693114540795
50th percentile: -11.798025444099
75th percentile: -5.110792044931733
------------------------------------------------------------
Column: CCi(6)
25th percentile: -15.187249665171176
50th percentile: -8.50913829146116
75th percentile: -1.5574253819684407
------------------------------------------------------------
Column: CCi(7)
25th percentile: -13.059185823518224
50th percentile: -9.522928682647105
75th percentile: -4.26486530111189
------------------------------------------------------------
Column: CCi(8)
25th percentile: -8.654436774203303
50th percentile: -2.77579978295039
75th percentile: 1.4490698271572076
------------------------------------------------------------
Column: CCi(9)
25th percentile: -9.945968305632848
50th percentile: -5.91153800842179
75th percentile: -0.860310309921836
------------------------------------------------------------
Column: CCi(10)
25th percentile: -10.678581036346024
50th percentile: -5.959028902429595
75th percentile: -1.8872778543747053
------------------------------------------------------------
Column: CCi(11)
25th percentile: -6.5770388292702195
50th percentile: -0.7005139646595719
75th percentile: 5.249738260768145
------------------------------------------------------------
Column: CCi(12)
25th percentile: -7.653717636135407
50th percentile: -3.981218915330655
75th percentile: -0.14677327712708127
------------------------------------------------------------
Column: dCCi(1)
25th percentile: -0.001935985492527775
50th percentile: 0.0021869583952064
75th percentile: 0.007794764140436601
------------------------------------------------------------
Column: dCCi(2)
25th percentile: -0.011936216742606351
50th percentile: -0.0050355580822182
75th percentile: 0.00385244087268105
------------------------------------------------------------
Column: dCCi(3)
25th percentile: -0.00382628930890845
50th percentile: 0.00388502563516655
75th percentile: 0.011846558470639725
------------------------------------------------------------
Column: dCCi(4)
25th percentile: -0.016397910890344376
50th percentile: -0.0086701849757265
75th percentile: 0.0037018585594575746
------------------------------------------------------------
Column: dCCi(5)
25th percentile: -0.0033482085580949497
50th percentile: 0.00571360850531565
75th percentile: 0.012577267572504575
------------------------------------------------------------
Column: dCCi(6)
25th percentile: -0.005069709264230525
50th percentile: 0.0041963954695323005
75th percentile: 0.015263198647101
------------------------------------------------------------
Column: dCCi(7)
25th percentile: -0.008233781756475326
50th percentile: 0.00077499537841575
75th percentile: 0.011560906754643425
------------------------------------------------------------
Column: dCCi(8)
25th percentile: -0.004222453852156175
50th percentile: 0.0062718688367585495
75th percentile: 0.019092084106021673
------------------------------------------------------------
Column: dCCi(9)
25th percentile: -0.009654421632963324
50th percentile: -0.0009369107978619
75th percentile: 0.006744794723751651
------------------------------------------------------------
Column: dCCi(10)
25th percentile: -0.009852540779729375
50th percentile: -0.0016141832342591
75th percentile: 0.008348817232383524
------------------------------------------------------------
Column: dCCi(11)
25th percentile: -0.0126736976992679
50th percentile: -0.0039213078573344
75th percentile: 0.00557787604494085
------------------------------------------------------------
Column: dCCi(12)
25th percentile: -0.006534279724802125
50th percentile: 0.000660656714138
75th percentile: 0.0095151562517963
------------------------------------------------------------
Column: d_1
25th percentile: 7.6047335088857295
50th percentile: 9.64656365105407
75th percentile: 10.75752211918045
------------------------------------------------------------
Column: F2_i
25th percentile: 2051.62744745824
50th percentile: 2471.09722222222
75th percentile: 2938.2365603193725
------------------------------------------------------------
Column: F2_{conv}
25th percentile: 800.1811555532445
50th percentile: 1206.596083012105
75th percentile: 1551.6776777613075
------------------------------------------------------------
Column: Diagnosis (ALS)
25th percentile: 0.0
50th percentile: 0.0
75th percentile: 1.0
------------------------------------------------------------
num_col = data.select_dtypes(include='number').columns
num_col= data[num_col].corr()
num_col.head(50)
| ID | Sex | Age | J1_a | J3_a | J5_a | J55_a | S1_a | S3_a | S5_a | ... | dCCi(7) | dCCi(8) | dCCi(9) | dCCi(10) | dCCi(11) | dCCi(12) | d_1 | F2_i | F2_{conv} | Diagnosis (ALS) | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ID | 1.000000 | 0.353321 | 0.157990 | -0.026373 | -0.004840 | -0.009701 | -0.061827 | 0.154836 | 0.119789 | 0.144409 | ... | 0.208685 | 0.071176 | -0.347256 | -0.089037 | 0.247796 | -0.050887 | 0.233082 | 0.189143 | 0.263867 | -0.303773 |
| Sex | 0.353321 | 1.000000 | 0.026966 | -0.149556 | -0.128604 | -0.126798 | -0.214536 | -0.188013 | -0.203108 | -0.177840 | ... | -0.162550 | -0.005526 | -0.198712 | -0.109606 | 0.163906 | -0.035527 | 0.167690 | 0.340356 | 0.306281 | -0.154675 |
| Age | 0.157990 | 0.026966 | 1.000000 | 0.051973 | 0.038240 | 0.052406 | 0.184253 | 0.084882 | 0.061959 | 0.092237 | ... | -0.134165 | -0.189492 | 0.183250 | 0.091320 | 0.109102 | 0.149704 | -0.241235 | -0.292623 | -0.341549 | 0.268348 |
| J1_a | -0.026373 | -0.149556 | 0.051973 | 1.000000 | 0.995834 | 0.994075 | 0.867935 | 0.882995 | 0.899598 | 0.878815 | ... | -0.052928 | 0.029363 | 0.212950 | 0.054432 | 0.139971 | -0.032022 | -0.114077 | -0.070777 | -0.099791 | 0.238028 |
| J3_a | -0.004840 | -0.128604 | 0.038240 | 0.995834 | 1.000000 | 0.988530 | 0.839019 | 0.879236 | 0.899346 | 0.872188 | ... | -0.045487 | 0.038137 | 0.212400 | 0.063660 | 0.170578 | -0.021323 | -0.079288 | -0.044397 | -0.082155 | 0.208204 |
| J5_a | -0.009701 | -0.126798 | 0.052406 | 0.994075 | 0.988530 | 1.000000 | 0.874643 | 0.893664 | 0.908115 | 0.892783 | ... | -0.046432 | 0.013669 | 0.200544 | 0.041891 | 0.144866 | -0.021428 | -0.132156 | -0.079135 | -0.111213 | 0.243350 |
| J55_a | -0.061827 | -0.214536 | 0.184253 | 0.867935 | 0.839019 | 0.874643 | 1.000000 | 0.797444 | 0.789768 | 0.790186 | ... | -0.086021 | 0.009768 | 0.180152 | -0.024549 | 0.012061 | -0.092113 | -0.211375 | -0.182878 | -0.209832 | 0.361060 |
| S1_a | 0.154836 | -0.188013 | 0.084882 | 0.882995 | 0.879236 | 0.893664 | 0.797444 | 1.000000 | 0.990674 | 0.995822 | ... | 0.064927 | -0.011202 | 0.134377 | -0.012836 | 0.103668 | -0.092436 | -0.128456 | -0.080673 | -0.094561 | 0.207148 |
| S3_a | 0.119789 | -0.203108 | 0.061959 | 0.899598 | 0.899346 | 0.908115 | 0.789768 | 0.990674 | 1.000000 | 0.984072 | ... | 0.042930 | 0.007786 | 0.162742 | -0.001081 | 0.103876 | -0.108362 | -0.130162 | -0.076678 | -0.095897 | 0.177238 |
| S5_a | 0.144409 | -0.177840 | 0.092237 | 0.878815 | 0.872188 | 0.892783 | 0.790186 | 0.995822 | 0.984072 | 1.000000 | ... | 0.075518 | -0.025746 | 0.136396 | -0.021068 | 0.097010 | -0.082632 | -0.140389 | -0.084438 | -0.095618 | 0.216198 |
| S11_a | 0.205873 | -0.145135 | 0.118785 | 0.793785 | 0.783033 | 0.805991 | 0.753024 | 0.960532 | 0.916210 | 0.961339 | ... | 0.060978 | -0.057123 | 0.073671 | -0.027948 | 0.088130 | -0.073699 | -0.129973 | -0.067801 | -0.069646 | 0.261048 |
| S55_a | 0.383137 | -0.002084 | 0.171393 | 0.515869 | 0.514877 | 0.532364 | 0.541721 | 0.739277 | 0.663008 | 0.722471 | ... | 0.028009 | -0.140707 | -0.086882 | -0.106442 | 0.238431 | 0.026470 | -0.092864 | -0.053242 | -0.086201 | 0.208952 |
| DPF_a | 0.052248 | -0.108992 | -0.119327 | 0.288830 | 0.325792 | 0.247616 | 0.067845 | 0.344221 | 0.355784 | 0.322806 | ... | 0.042554 | 0.049755 | 0.090050 | 0.042907 | 0.190135 | 0.017491 | 0.090162 | 0.160099 | 0.119822 | -0.053611 |
| PFR_a | -0.153993 | -0.163947 | 0.136052 | 0.690337 | 0.678378 | 0.720521 | 0.817227 | 0.648049 | 0.643953 | 0.631902 | ... | -0.137935 | -0.081020 | 0.233789 | 0.153089 | -0.074192 | -0.092107 | -0.285186 | -0.295120 | -0.331199 | 0.346148 |
| PPE_a | -0.130256 | -0.232222 | 0.049242 | 0.765816 | 0.728855 | 0.740427 | 0.763242 | 0.708401 | 0.684491 | 0.705889 | ... | -0.020192 | -0.009301 | 0.088148 | -0.033811 | 0.040789 | 0.016792 | -0.189690 | -0.086289 | -0.068347 | 0.417961 |
| PVI_a | -0.189488 | -0.220055 | 0.154727 | 0.791731 | 0.746664 | 0.804099 | 0.861297 | 0.665946 | 0.674429 | 0.674411 | ... | -0.067540 | -0.034525 | 0.268916 | 0.012992 | -0.116683 | -0.057818 | -0.261770 | -0.194039 | -0.209879 | 0.422460 |
| HNR_a | -0.115708 | 0.271977 | -0.237268 | -0.428649 | -0.384898 | -0.411513 | -0.580829 | -0.559603 | -0.513468 | -0.562368 | ... | -0.034511 | 0.137268 | -0.088407 | 0.032703 | 0.206220 | 0.176200 | 0.115798 | 0.280842 | 0.206106 | -0.274830 |
| GNEa_{\mu} | -0.274318 | 0.156837 | -0.175086 | -0.377819 | -0.369656 | -0.383533 | -0.355030 | -0.486878 | -0.445019 | -0.470542 | ... | -0.171565 | 0.033288 | 0.037797 | 0.095623 | -0.272991 | -0.186209 | 0.262516 | 0.165956 | 0.128041 | -0.323897 |
| GNEa_{\sigma} | 0.119406 | -0.091656 | 0.119993 | 0.294581 | 0.275977 | 0.295543 | 0.289110 | 0.312284 | 0.294989 | 0.306613 | ... | 0.062595 | -0.128362 | -0.052642 | -0.120171 | 0.152256 | 0.084637 | -0.319755 | -0.175092 | -0.114885 | 0.192111 |
| Ha(1)_{mu} | -0.165213 | 0.219942 | -0.077950 | -0.100325 | -0.081962 | -0.109162 | -0.281462 | -0.299688 | -0.238590 | -0.287443 | ... | -0.048923 | 0.097181 | 0.025277 | 0.058374 | 0.231784 | 0.316713 | -0.090537 | 0.348738 | 0.151358 | -0.015091 |
| Ha(2)_{mu} | -0.124926 | 0.153188 | -0.008920 | -0.333848 | -0.338693 | -0.345808 | -0.334003 | -0.467480 | -0.416931 | -0.466933 | ... | -0.105838 | 0.142852 | 0.069376 | 0.082776 | -0.259809 | -0.272162 | 0.081067 | 0.059393 | 0.125689 | -0.103948 |
| Ha(3)_{mu} | 0.103856 | 0.042970 | 0.132355 | -0.324382 | -0.305862 | -0.337177 | -0.265084 | -0.335657 | -0.324664 | -0.350520 | ... | -0.171801 | -0.067974 | 0.139057 | 0.009668 | 0.143731 | 0.160939 | 0.116345 | 0.301187 | 0.074147 | -0.053245 |
| Ha(4)_{mu} | -0.353378 | -0.281106 | -0.119140 | -0.306979 | -0.317505 | -0.344421 | -0.251308 | -0.379710 | -0.351397 | -0.381840 | ... | -0.044602 | 0.146047 | 0.038474 | 0.039402 | -0.433339 | -0.299241 | -0.015277 | -0.138041 | -0.068521 | -0.117915 |
| Ha(5)_{mu} | -0.118375 | -0.292146 | -0.086949 | -0.245845 | -0.253985 | -0.262802 | -0.276637 | -0.214620 | -0.189395 | -0.216307 | ... | 0.032909 | 0.129864 | 0.082642 | 0.179189 | -0.427686 | -0.134016 | 0.063195 | -0.003550 | -0.019178 | -0.146109 |
| Ha(6)_{mu} | -0.079265 | -0.173885 | -0.058820 | -0.237309 | -0.248495 | -0.253947 | -0.213256 | -0.165262 | -0.145764 | -0.161030 | ... | -0.105779 | 0.125878 | 0.153285 | 0.201286 | -0.438548 | -0.385522 | 0.153544 | -0.075255 | 0.005604 | -0.225711 |
| Ha(7)_{mu} | -0.138349 | -0.250066 | -0.155735 | -0.186489 | -0.199179 | -0.219710 | -0.179375 | -0.174628 | -0.164442 | -0.171237 | ... | 0.017939 | 0.156912 | 0.029694 | 0.334677 | -0.339610 | -0.163573 | 0.266243 | 0.228675 | 0.204882 | -0.320722 |
| Ha(8)_{mu} | -0.121539 | -0.287087 | -0.104500 | -0.237183 | -0.255279 | -0.269171 | -0.179818 | -0.196300 | -0.185822 | -0.195528 | ... | 0.101023 | 0.116308 | -0.019787 | 0.199782 | -0.339482 | -0.237434 | 0.138015 | 0.039868 | 0.093605 | -0.334755 |
| Ha(1)_{sd} | 0.252948 | 0.102299 | 0.155345 | 0.209805 | 0.210181 | 0.226781 | 0.335070 | 0.359836 | 0.298946 | 0.334164 | ... | 0.015322 | -0.091236 | -0.018951 | -0.002015 | 0.054685 | -0.028832 | -0.143228 | -0.222298 | -0.130551 | 0.190342 |
| Ha(2)_{sd} | 0.367868 | 0.037722 | 0.248074 | 0.333632 | 0.337597 | 0.351552 | 0.379341 | 0.484586 | 0.421893 | 0.462802 | ... | 0.154778 | -0.222537 | 0.038520 | -0.126101 | 0.205058 | 0.220975 | -0.139401 | -0.071389 | -0.113314 | 0.212794 |
| Ha(3)_{sd} | 0.309049 | 0.211195 | 0.156628 | 0.304801 | 0.309094 | 0.320883 | 0.351082 | 0.386050 | 0.349712 | 0.369003 | ... | 0.018762 | 0.048072 | -0.075712 | -0.048224 | 0.061917 | -0.229973 | -0.093331 | -0.315621 | -0.106607 | 0.115198 |
| Ha(4)_{sd} | 0.370749 | 0.165470 | 0.236827 | 0.387895 | 0.400588 | 0.401136 | 0.341038 | 0.487909 | 0.433998 | 0.482561 | ... | 0.101399 | 0.015593 | 0.044674 | -0.125766 | 0.394360 | 0.183781 | 0.013436 | 0.102594 | -0.017495 | 0.282022 |
| Ha(5)_{sd} | 0.190336 | 0.143987 | 0.165381 | 0.157068 | 0.146388 | 0.163994 | 0.291736 | 0.252341 | 0.187416 | 0.245967 | ... | 0.170039 | 0.007895 | -0.183807 | -0.270519 | 0.069701 | -0.192071 | -0.041828 | -0.229205 | -0.039539 | 0.139464 |
| Ha(6)_{sd} | 0.155783 | -0.020445 | 0.190076 | 0.694273 | 0.698622 | 0.708815 | 0.667639 | 0.700282 | 0.679247 | 0.685565 | ... | 0.153504 | -0.007750 | 0.019564 | -0.113980 | 0.243379 | 0.089395 | -0.234560 | -0.083438 | -0.157219 | 0.254764 |
| Ha(7)_{sd} | 0.052744 | -0.013304 | 0.186713 | 0.698752 | 0.690979 | 0.721400 | 0.669413 | 0.663441 | 0.649653 | 0.657755 | ... | 0.064100 | -0.040921 | 0.035504 | -0.096022 | 0.154848 | -0.059691 | -0.284878 | -0.297898 | -0.199028 | 0.332693 |
| Ha(8)_{sd} | 0.141361 | 0.067460 | 0.178830 | 0.569665 | 0.583398 | 0.591051 | 0.525456 | 0.593315 | 0.574077 | 0.577069 | ... | 0.102714 | -0.049433 | 0.125121 | -0.040302 | 0.210561 | 0.119946 | -0.163228 | -0.077791 | -0.155392 | 0.264278 |
| Ha(1)_{rel} | -0.095473 | 0.314179 | -0.148719 | -0.146390 | -0.129113 | -0.146499 | -0.236918 | -0.291669 | -0.244440 | -0.282002 | ... | -0.096597 | 0.085456 | 0.119435 | 0.116045 | 0.087542 | 0.112024 | 0.012699 | 0.383269 | 0.290716 | -0.284783 |
| Ha(2)_{rel} | -0.073710 | 0.234598 | -0.119944 | -0.294257 | -0.302698 | -0.294785 | -0.303144 | -0.413920 | -0.372068 | -0.405555 | ... | -0.132439 | 0.083500 | 0.009204 | 0.057287 | -0.240436 | -0.287788 | 0.076844 | 0.056267 | 0.183504 | -0.133741 |
| Ha(3)_{rel} | 0.018118 | 0.034654 | 0.105481 | -0.234632 | -0.225401 | -0.238622 | -0.211914 | -0.266072 | -0.248613 | -0.264441 | ... | -0.147224 | -0.030036 | -0.000487 | -0.012761 | -0.034920 | -0.073090 | 0.054324 | 0.113177 | 0.054053 | -0.053738 |
| Ha(4)_{rel} | -0.312251 | -0.192759 | -0.181772 | -0.176872 | -0.171464 | -0.212065 | -0.173253 | -0.296860 | -0.274823 | -0.302252 | ... | -0.077421 | 0.080714 | -0.003491 | 0.073038 | -0.387192 | -0.256537 | 0.169031 | -0.178908 | -0.077074 | -0.218108 |
| Ha(5)_{rel} | -0.165205 | -0.353902 | -0.021493 | -0.182862 | -0.191071 | -0.188883 | -0.217096 | -0.173020 | -0.149401 | -0.165262 | ... | -0.052315 | 0.105585 | 0.130669 | 0.154075 | -0.242847 | 0.003731 | 0.070306 | -0.083541 | -0.055161 | -0.041251 |
| Ha(6)_{rel} | -0.110018 | -0.227471 | -0.050297 | -0.188892 | -0.194743 | -0.196042 | -0.204503 | -0.120517 | -0.087448 | -0.119130 | ... | -0.028841 | 0.092112 | 0.073490 | 0.049186 | -0.254953 | -0.211050 | 0.139718 | -0.127795 | 0.020468 | -0.189111 |
| Ha(7)_{rel} | -0.022862 | -0.133471 | -0.197313 | -0.198924 | -0.203528 | -0.219053 | -0.195084 | -0.159736 | -0.143192 | -0.159307 | ... | 0.011541 | 0.113847 | 0.052455 | 0.287087 | -0.242712 | -0.066287 | 0.359289 | 0.277678 | 0.285354 | -0.380733 |
| Ha(8)_{rel} | -0.027698 | -0.186962 | -0.061388 | -0.154618 | -0.174363 | -0.174539 | -0.086011 | -0.105243 | -0.094455 | -0.103247 | ... | 0.058278 | 0.042485 | -0.035928 | 0.128137 | -0.141871 | -0.133814 | 0.218747 | 0.113280 | 0.156139 | -0.306330 |
| CCa(1) | -0.353817 | -0.303120 | -0.152466 | 0.252826 | 0.237095 | 0.219133 | 0.174051 | 0.051070 | 0.087604 | 0.034774 | ... | -0.033666 | 0.124004 | 0.131498 | 0.098664 | -0.086036 | 0.051651 | -0.122458 | -0.125364 | -0.035485 | 0.175759 |
| CCa(2) | -0.266577 | -0.408539 | -0.099429 | -0.030422 | -0.050068 | -0.055066 | -0.067482 | -0.064553 | -0.060828 | -0.062895 | ... | 0.040505 | 0.093730 | -0.045816 | -0.031705 | 0.105632 | 0.047969 | -0.462804 | -0.128311 | -0.084633 | 0.171248 |
| CCa(3) | -0.346831 | 0.019501 | -0.065033 | 0.321444 | 0.297212 | 0.315099 | 0.261434 | 0.168076 | 0.181808 | 0.176193 | ... | -0.095471 | 0.003133 | 0.100248 | 0.216155 | -0.222838 | -0.050155 | -0.107038 | -0.089647 | -0.167311 | 0.061485 |
| CCa(4) | 0.155517 | 0.095044 | -0.187602 | 0.046988 | 0.047891 | 0.046431 | -0.066258 | 0.074781 | 0.093887 | 0.085955 | ... | 0.080663 | 0.065329 | 0.084401 | -0.005626 | 0.167466 | 0.068991 | 0.033302 | 0.359973 | 0.350782 | -0.042322 |
| CCa(5) | -0.074996 | -0.396060 | 0.025439 | 0.003738 | 0.004417 | -0.016510 | 0.019357 | 0.101384 | 0.101657 | 0.095316 | ... | 0.056309 | 0.248074 | -0.124367 | 0.203504 | -0.143172 | -0.061662 | 0.129597 | -0.087925 | -0.012165 | -0.176212 |
| CCa(6) | -0.280783 | -0.318111 | -0.006001 | 0.267408 | 0.232462 | 0.245960 | 0.306436 | 0.112808 | 0.109729 | 0.108521 | ... | -0.058603 | -0.000882 | 0.072978 | 0.135972 | -0.077029 | 0.001647 | -0.212419 | -0.223360 | -0.210412 | 0.302913 |
| CCa(7) | -0.194842 | -0.555857 | -0.109585 | 0.043656 | 0.035913 | 0.020235 | 0.174208 | 0.121908 | 0.104421 | 0.098404 | ... | 0.036690 | 0.004805 | -0.076866 | 0.063435 | -0.151985 | -0.138205 | -0.164200 | -0.186883 | -0.152395 | 0.138397 |
50 rows × 135 columns
plt.figure (figsize=(70,70))
sns.heatmap(data=num_col,annot=True,fmt='.2g',cmap='viridis')
#plt.tight_layout()
<AxesSubplot:>
corr_matrix=data.corr()
corr_matrix
| ID | Sex | Age | J1_a | J3_a | J5_a | J55_a | S1_a | S3_a | S5_a | ... | dCCi(7) | dCCi(8) | dCCi(9) | dCCi(10) | dCCi(11) | dCCi(12) | d_1 | F2_i | F2_{conv} | Diagnosis (ALS) | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ID | 1.000000 | 0.353321 | 0.157990 | -0.026373 | -0.004840 | -0.009701 | -0.061827 | 0.154836 | 0.119789 | 0.144409 | ... | 0.208685 | 0.071176 | -0.347256 | -0.089037 | 0.247796 | -0.050887 | 0.233082 | 0.189143 | 0.263867 | -0.303773 |
| Sex | 0.353321 | 1.000000 | 0.026966 | -0.149556 | -0.128604 | -0.126798 | -0.214536 | -0.188013 | -0.203108 | -0.177840 | ... | -0.162550 | -0.005526 | -0.198712 | -0.109606 | 0.163906 | -0.035527 | 0.167690 | 0.340356 | 0.306281 | -0.154675 |
| Age | 0.157990 | 0.026966 | 1.000000 | 0.051973 | 0.038240 | 0.052406 | 0.184253 | 0.084882 | 0.061959 | 0.092237 | ... | -0.134165 | -0.189492 | 0.183250 | 0.091320 | 0.109102 | 0.149704 | -0.241235 | -0.292623 | -0.341549 | 0.268348 |
| J1_a | -0.026373 | -0.149556 | 0.051973 | 1.000000 | 0.995834 | 0.994075 | 0.867935 | 0.882995 | 0.899598 | 0.878815 | ... | -0.052928 | 0.029363 | 0.212950 | 0.054432 | 0.139971 | -0.032022 | -0.114077 | -0.070777 | -0.099791 | 0.238028 |
| J3_a | -0.004840 | -0.128604 | 0.038240 | 0.995834 | 1.000000 | 0.988530 | 0.839019 | 0.879236 | 0.899346 | 0.872188 | ... | -0.045487 | 0.038137 | 0.212400 | 0.063660 | 0.170578 | -0.021323 | -0.079288 | -0.044397 | -0.082155 | 0.208204 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| dCCi(12) | -0.050887 | -0.035527 | 0.149704 | -0.032022 | -0.021323 | -0.021428 | -0.092113 | -0.092436 | -0.108362 | -0.082632 | ... | 0.173764 | -0.343383 | 0.157203 | -0.132449 | 0.470498 | 1.000000 | -0.061372 | 0.107644 | -0.111535 | 0.236204 |
| d_1 | 0.233082 | 0.167690 | -0.241235 | -0.114077 | -0.079288 | -0.132156 | -0.211375 | -0.128456 | -0.130162 | -0.140389 | ... | 0.187991 | 0.321498 | -0.089471 | 0.126085 | -0.081252 | -0.061372 | 1.000000 | 0.465199 | 0.498940 | -0.456277 |
| F2_i | 0.189143 | 0.340356 | -0.292623 | -0.070777 | -0.044397 | -0.079135 | -0.182878 | -0.080673 | -0.076678 | -0.084438 | ... | 0.113125 | 0.268072 | -0.154876 | 0.009993 | 0.200750 | 0.107644 | 0.465199 | 1.000000 | 0.850953 | -0.302416 |
| F2_{conv} | 0.263867 | 0.306281 | -0.341549 | -0.099791 | -0.082155 | -0.111213 | -0.209832 | -0.094561 | -0.095897 | -0.095618 | ... | 0.189239 | 0.344863 | -0.274540 | -0.031831 | 0.084229 | -0.111535 | 0.498940 | 0.850953 | 1.000000 | -0.390466 |
| Diagnosis (ALS) | -0.303773 | -0.154675 | 0.268348 | 0.238028 | 0.208204 | 0.243350 | 0.361060 | 0.207148 | 0.177238 | 0.216198 | ... | -0.131194 | -0.257660 | 0.237359 | -0.183486 | 0.023006 | 0.236204 | -0.456277 | -0.302416 | -0.390466 | 1.000000 |
135 rows × 135 columns
corr_matrix['Diagnosis (ALS)']
ID -0.303773
Sex -0.154675
Age 0.268348
J1_a 0.238028
J3_a 0.208204
...
dCCi(12) 0.236204
d_1 -0.456277
F2_i -0.302416
F2_{conv} -0.390466
Diagnosis (ALS) 1.000000
Name: Diagnosis (ALS), Length: 135, dtype: float64
sns.pairplot(data=data.iloc[:,2:10])
<seaborn.axisgrid.PairGrid at 0x19ff8c31ca0>
from sklearn import tree
from sklearn.svm import SVC
from sklearn.compose import ColumnTransformer
from sklearn.naive_bayes import GaussianNB
from sklearn.pipeline import Pipeline
from sklearn.linear_model import LinearRegression,LogisticRegression
from sklearn.model_selection import train_test_split,GridSearchCV,RandomizedSearchCV
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import KFold,StratifiedKFold,LeaveOneOut,ShuffleSplit
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import RandomForestClassifier,BaggingClassifier,AdaBoostClassifier,GradientBoostingClassifier
from sklearn.metrics import accuracy_score,classification_report
from sklearn.neighbors import KNeighborsClassifier
from sklearn.multiclass import OneVsRestClassifier
del data['ID']
x= data.drop('Diagnosis (ALS)',axis = 1)
y= data['Diagnosis (ALS)']
x_train,x_test,y_train,y_test = train_test_split(x,y,test_size=0.2,random_state=42)
model = [
DecisionTreeClassifier(),
RandomForestClassifier(),
GradientBoostingClassifier(),
BaggingClassifier(),
AdaBoostClassifier(),
LogisticRegression(),
SVC(),
KNeighborsClassifier(),
GaussianNB()
]
x_train
| Sex | Age | J1_a | J3_a | J5_a | J55_a | S1_a | S3_a | S5_a | S11_a | ... | dCCi(6) | dCCi(7) | dCCi(8) | dCCi(9) | dCCi(10) | dCCi(11) | dCCi(12) | d_1 | F2_i | F2_{conv} | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 13 | 1 | 63 | 0.805433 | 0.335434 | 0.487871 | 1.813700 | 4.485662 | 2.192828 | 2.864096 | 4.283792 | ... | 0.005770 | -0.028306 | -0.035823 | -0.004287 | -0.014985 | -0.004156 | -0.005061 | 7.029500 | 2730.764545 | 1288.920905 |
| 34 | 0 | 38 | 0.415366 | 0.254119 | 0.243906 | 0.449362 | 2.394697 | 1.292778 | 1.468358 | 1.860062 | ... | 0.000016 | 0.008047 | -0.005823 | -0.006588 | -0.000030 | 0.003137 | -0.002440 | 8.531677 | 3515.050257 | 2441.219054 |
| 50 | 1 | 57 | 0.098881 | 0.065791 | 0.092655 | 0.363699 | 0.883453 | 0.449099 | 0.497111 | 0.804179 | ... | 0.015152 | -0.027019 | 0.037807 | -0.019812 | 0.000436 | -0.002840 | -0.013161 | 10.108459 | 2143.018556 | 805.694015 |
| 3 | 1 | 70 | 0.455793 | 0.174870 | 0.243660 | 0.962641 | 2.883768 | 1.284926 | 1.915058 | 2.929953 | ... | 0.013213 | -0.019285 | -0.021768 | 0.020495 | 0.035976 | -0.034648 | 0.008021 | 5.447137 | 1860.172768 | 359.409974 |
| 17 | 0 | 57 | 0.351191 | 0.165077 | 0.227554 | 0.849025 | 3.695872 | 1.776465 | 2.379529 | 3.718969 | ... | 0.024865 | -0.008019 | 0.005046 | 0.023446 | -0.000726 | -0.016418 | 0.010174 | 6.031056 | 2074.091402 | 927.063276 |
| 49 | 1 | 39 | 0.463874 | 0.290374 | 0.278926 | 0.550290 | 2.449028 | 1.372602 | 1.412486 | 1.786304 | ... | -0.000234 | 0.011520 | 0.009453 | 0.002072 | -0.002811 | 0.004577 | -0.009058 | 10.616077 | 3164.536485 | 2037.766311 |
| 8 | 0 | 67 | 0.537010 | 0.243234 | 0.318075 | 1.951256 | 6.568645 | 2.891654 | 4.620345 | 7.249579 | ... | 0.014234 | 0.013594 | -0.003722 | -0.003859 | -0.011985 | -0.027240 | 0.002325 | 8.760510 | 1840.022120 | 669.022078 |
| 6 | 0 | 57 | 0.691093 | 0.406901 | 0.406287 | 0.765986 | 6.168256 | 3.702088 | 3.286232 | 4.352221 | ... | 0.002661 | -0.012605 | 0.013385 | 0.004513 | 0.001568 | -0.008244 | 0.005801 | 5.945219 | 2313.388825 | 1219.744513 |
| 33 | 0 | 41 | 1.063272 | 0.683918 | 0.504427 | 0.613402 | 3.176717 | 1.870164 | 1.590798 | 2.089394 | ... | 0.017293 | -0.008880 | -0.001511 | 0.003965 | 0.015240 | -0.006500 | -0.008723 | 10.482453 | 2263.284796 | 801.333727 |
| 4 | 0 | 66 | 0.269335 | 0.143961 | 0.167465 | 0.547745 | 2.327924 | 1.164109 | 1.420891 | 2.141512 | ... | 0.002948 | -0.005743 | 0.004726 | -0.015247 | 0.003900 | -0.007686 | -0.003784 | 8.562517 | 2051.627447 | 817.111847 |
| 47 | 1 | 63 | 0.753234 | 0.467912 | 0.442792 | 0.540327 | 4.801768 | 2.677700 | 3.241265 | 3.518265 | ... | -0.018937 | 0.011239 | 0.011488 | 0.015334 | 0.008337 | 0.005474 | 0.011687 | 10.515820 | 3057.463491 | 1494.054076 |
| 19 | 0 | 40 | 0.496922 | 0.213975 | 0.293201 | 0.957065 | 3.293700 | 1.672811 | 1.894214 | 2.932669 | ... | 0.023989 | -0.030137 | 0.024769 | 0.000567 | 0.005071 | -0.023693 | 0.009770 | 7.872279 | 2143.018556 | 985.160918 |
| 54 | 1 | 62 | 0.823780 | 0.503064 | 0.497916 | 0.704065 | 6.861939 | 3.993216 | 4.174705 | 4.703103 | ... | 0.014494 | 0.003410 | 0.000716 | -0.010791 | 0.004878 | -0.005527 | -0.001659 | 7.388631 | 2096.808356 | 737.085571 |
| 41 | 1 | 37 | 0.818954 | 0.484998 | 0.511515 | 0.721296 | 4.942091 | 2.724820 | 3.320166 | 3.752014 | ... | 0.005945 | 0.021267 | -0.008438 | 0.007339 | -0.004838 | -0.004133 | 0.000937 | 10.151495 | 2444.009071 | 1157.993834 |
| 55 | 1 | 50 | 0.462076 | 0.269359 | 0.296952 | 0.909990 | 5.020638 | 2.305690 | 2.837745 | 5.387330 | ... | 0.001699 | -0.001674 | 0.012043 | -0.003015 | 0.022928 | -0.005444 | -0.006394 | 14.651111 | 3515.050257 | 2210.936432 |
| 31 | 1 | 64 | 0.219429 | 0.144385 | 0.171661 | 0.555528 | 2.054277 | 1.108746 | 1.260472 | 1.580742 | ... | -0.011558 | -0.004168 | 0.018603 | 0.019350 | 0.016342 | 0.014127 | 0.022756 | 10.121803 | 2988.533127 | 1332.559788 |
| 30 | 1 | 53 | 0.561542 | 0.331788 | 0.345130 | 1.020709 | 6.074875 | 2.798090 | 3.526055 | 5.735960 | ... | 0.022664 | 0.008537 | -0.000306 | -0.012570 | -0.048113 | 0.009073 | -0.005201 | 12.036001 | 2526.285657 | 1200.269866 |
| 59 | 0 | 43 | 0.255799 | 0.123679 | 0.182658 | 0.505591 | 6.222031 | 2.876602 | 3.894294 | 5.697601 | ... | -0.060395 | 0.220533 | 0.089766 | -0.120838 | -0.004221 | -0.013165 | 0.004642 | 9.855665 | 3128.341308 | 1990.937097 |
| 60 | 0 | 63 | 0.513175 | 0.296489 | 0.334845 | 0.729804 | 9.686563 | 4.327943 | 5.687977 | 9.912757 | ... | -0.046223 | 0.028016 | -0.038739 | 0.011588 | -0.011281 | -0.004294 | 0.011239 | 11.094558 | 1964.218942 | 601.076046 |
| 15 | 0 | 61 | 1.177795 | 0.730069 | 0.569287 | 1.542224 | 5.883227 | 3.384535 | 2.875918 | 4.264450 | ... | 0.028733 | -0.004708 | -0.004383 | 0.006398 | -0.014412 | -0.005085 | 0.005530 | 7.148809 | 2051.627447 | 784.563460 |
| 27 | 1 | 52 | 0.475047 | 0.308491 | 0.266091 | 0.396462 | 3.686641 | 1.999494 | 2.083195 | 2.985985 | ... | 0.009989 | 0.000009 | 0.042347 | -0.003170 | 0.002103 | 0.011023 | -0.031324 | 11.597077 | 2792.655884 | 1457.933269 |
| 26 | 1 | 55 | 0.764443 | 0.423008 | 0.472764 | 1.699466 | 8.254286 | 3.966819 | 5.010081 | 7.932608 | ... | 0.018794 | 0.036827 | 0.029426 | -0.024056 | -0.065735 | 0.012986 | 0.012941 | 9.482607 | 2471.097222 | 1019.521207 |
| 24 | 1 | 55 | 0.419330 | 0.255329 | 0.338319 | 0.486463 | 4.366452 | 1.932596 | 2.855240 | 4.193509 | ... | -0.005714 | 0.012337 | -0.005475 | -0.001179 | -0.002687 | 0.005369 | 0.034289 | 11.766102 | 2888.617021 | 1839.961952 |
| 46 | 1 | 55 | 0.454844 | 0.289458 | 0.293609 | 0.582757 | 2.124786 | 1.170689 | 1.182154 | 1.450585 | ... | 0.006111 | 0.003214 | 0.007520 | -0.024862 | 0.016600 | -0.015827 | 0.002088 | 12.189059 | 3092.653846 | 1551.286187 |
| 11 | 0 | 67 | 1.608454 | 0.989100 | 0.894706 | 1.304613 | 6.031953 | 3.279233 | 3.729620 | 4.661445 | ... | 0.019701 | 0.004293 | 0.026891 | 0.080337 | -0.007352 | 0.055993 | 0.075071 | 10.674106 | 2007.441819 | 481.009629 |
| 32 | 1 | 53 | 0.598550 | 0.350577 | 0.378646 | 0.654399 | 4.224992 | 2.312947 | 2.678596 | 3.073228 | ... | 0.001768 | -0.003924 | 0.001995 | 0.004019 | -0.007207 | 0.004614 | 0.003154 | 7.615608 | 2921.471038 | 1230.982918 |
| 57 | 1 | 65 | 0.356684 | 0.233194 | 0.242305 | 0.410246 | 3.251335 | 1.867689 | 1.908461 | 2.207320 | ... | 0.005494 | -0.003761 | 0.006982 | 0.012774 | 0.008384 | 0.002823 | -0.014323 | 10.889792 | 2471.097222 | 1549.074209 |
| 45 | 1 | 60 | 0.286517 | 0.176603 | 0.195712 | 0.692300 | 1.847736 | 0.869278 | 1.099434 | 1.878774 | ... | 0.023767 | -0.020693 | 0.019078 | -0.034556 | -0.006731 | -0.025442 | -0.005668 | 12.874560 | 2670.464441 | 1309.871125 |
| 37 | 0 | 35 | 0.758571 | 0.464961 | 0.413086 | 0.605323 | 9.271523 | 5.707370 | 5.150374 | 5.898369 | ... | -0.003686 | 0.018992 | 0.034957 | 0.016890 | -0.009376 | -0.008998 | -0.007465 | 12.892692 | 2888.617021 | 1653.804580 |
| 29 | 0 | 69 | 0.511742 | 0.313666 | 0.320677 | 0.431433 | 7.417198 | 4.258109 | 4.961685 | 5.098505 | ... | -0.013859 | 0.000308 | -0.038984 | 0.048771 | -0.014493 | 0.008647 | -0.004524 | 2.512995 | 1233.583584 | 48.246203 |
| 43 | 0 | 52 | 1.529994 | 0.894926 | 0.809959 | 1.715071 | 7.627483 | 4.321696 | 4.415383 | 5.571067 | ... | 0.015596 | -0.012218 | 0.015828 | -0.014697 | 0.010636 | 0.004654 | -0.003235 | 7.758796 | 2761.507400 | 1641.852909 |
| 48 | 1 | 45 | 0.155762 | 0.091831 | 0.117099 | 0.575170 | 1.575403 | 0.738640 | 0.834830 | 1.517716 | ... | 0.002348 | -0.002313 | 0.008766 | 0.006330 | 0.016645 | -0.003417 | 0.002115 | 10.713432 | 3599.554394 | 2226.127951 |
| 1 | 1 | 57 | 0.344026 | 0.177032 | 0.206458 | 0.827714 | 1.967728 | 0.856639 | 1.179851 | 2.050048 | ... | 0.019235 | 0.002485 | -0.004535 | -0.000225 | -0.006977 | -0.012510 | 0.014773 | 5.729322 | 1985.712014 | 561.802625 |
| 21 | 0 | 68 | 0.379367 | 0.223560 | 0.308426 | 1.821009 | 5.539475 | 2.551095 | 3.000675 | 5.956155 | ... | 0.008846 | -0.006281 | -0.004169 | -0.008164 | 0.012667 | -0.015442 | 0.001157 | 5.218871 | 1649.621788 | 177.843734 |
| 2 | 1 | 58 | 0.264740 | 0.148228 | 0.177078 | 0.532566 | 1.850893 | 0.942743 | 1.071950 | 1.502212 | ... | 0.007199 | -0.013927 | 0.007908 | 0.007960 | -0.009022 | -0.012488 | -0.015588 | 8.258488 | 2364.695972 | 796.723440 |
| 62 | 1 | 68 | 1.336216 | 0.815757 | 0.733197 | 0.981928 | 11.224542 | 5.295879 | 6.994751 | 11.706090 | ... | 0.025679 | 0.015712 | 0.013437 | 0.025113 | 0.008852 | -0.010132 | -0.008458 | 10.670669 | 3201.250289 | 2284.051658 |
| 39 | 0 | 38 | 0.176448 | 0.103346 | 0.123381 | 0.649644 | 2.649815 | 1.410593 | 1.504265 | 2.236375 | ... | 0.016461 | 0.014798 | -0.011568 | -0.009276 | -0.003996 | -0.003248 | -0.005049 | 10.074644 | 2119.782609 | 580.338238 |
| 35 | 0 | 60 | 0.391222 | 0.200687 | 0.232286 | 0.638498 | 2.324343 | 1.181015 | 1.475889 | 1.993371 | ... | -0.005405 | -0.006063 | 0.028443 | -0.006618 | 0.003011 | -0.005547 | -0.002806 | 10.525555 | 2700.419449 | 1393.549002 |
| 23 | 1 | 63 | 0.504802 | 0.253832 | 0.313823 | 1.229761 | 6.571067 | 2.833840 | 4.277576 | 7.448475 | ... | 0.013513 | -0.003382 | 0.027770 | -0.005112 | -0.027102 | 0.012612 | -0.010165 | 7.339732 | 3556.978755 | 2129.076098 |
| 53 | 1 | 60 | 0.121065 | 0.079473 | 0.101627 | 0.285497 | 1.117740 | 0.558948 | 0.615284 | 0.924619 | ... | -0.005255 | 0.017626 | -0.007311 | -0.006541 | -0.012625 | 0.013987 | 0.014222 | 11.261019 | 3201.250289 | 1960.299963 |
| 10 | 0 | 67 | 1.232990 | 0.561293 | 0.784691 | 1.889785 | 4.139457 | 1.915796 | 2.692091 | 4.296011 | ... | 0.031624 | -0.018089 | 0.018493 | 0.006547 | -0.004817 | -0.003710 | -0.000692 | 2.276702 | 1686.160000 | 669.461749 |
| 22 | 1 | 64 | 0.437128 | 0.265519 | 0.349086 | 0.493971 | 3.205305 | 1.515726 | 2.119909 | 2.591283 | ... | -0.060397 | 0.056134 | -0.069202 | -0.040180 | -0.058987 | 0.044552 | 0.077897 | 2.986929 | 1800.351911 | 784.205580 |
| 18 | 0 | 57 | 0.426554 | 0.202661 | 0.255198 | 0.885479 | 4.387137 | 1.892587 | 2.628737 | 4.550564 | ... | 0.003446 | 0.010420 | 0.005288 | -0.006713 | 0.013147 | -0.017816 | 0.017087 | 11.136041 | 2238.670803 | 930.223353 |
| 63 | 1 | 60 | 0.916706 | 0.566121 | 0.512857 | 1.467165 | 6.372832 | 3.251168 | 3.539229 | 5.627211 | ... | -0.072828 | -0.046235 | 0.041946 | -0.065313 | -0.016682 | 0.061026 | -0.005883 | 6.972152 | 2792.655884 | 1518.529172 |
| 20 | 1 | 64 | 0.797801 | 0.470116 | 0.522910 | 1.663179 | 7.778152 | 3.640445 | 4.355894 | 7.958491 | ... | 0.028207 | -0.052002 | -0.038210 | 0.028143 | 0.033156 | 0.010924 | 0.020823 | 5.924309 | 1880.538263 | 482.819916 |
| 7 | 0 | 58 | 1.210548 | 0.726523 | 0.661670 | 1.205596 | 8.492104 | 4.109625 | 5.377768 | 8.005940 | ... | 0.007534 | 0.017088 | 0.015907 | -0.006379 | 0.057303 | -0.001919 | -0.008007 | 8.422353 | 1964.218942 | 759.068477 |
| 42 | 1 | 50 | 0.323175 | 0.126138 | 0.176197 | 0.907850 | 3.069980 | 1.372204 | 1.869070 | 3.225635 | ... | 0.004152 | -0.001733 | 0.030566 | -0.037259 | -0.020167 | -0.042955 | -0.083977 | 9.167460 | 444.730268 | 1169.075556 |
| 14 | 1 | 62 | 1.394205 | 0.839935 | 0.703224 | 1.362995 | 4.661601 | 2.402909 | 2.826132 | 4.168789 | ... | -0.000823 | 0.025207 | -0.002524 | -0.006103 | -0.012850 | -0.015023 | 0.019711 | 12.862700 | 3092.653846 | 1552.852150 |
| 28 | 0 | 68 | 1.076446 | 0.624824 | 0.561100 | 1.965493 | 7.001105 | 3.785627 | 4.033533 | 5.810484 | ... | -0.011602 | 0.018274 | 0.004485 | 0.005101 | -0.007367 | 0.007041 | -0.001560 | 11.097431 | 3515.050257 | 2157.871393 |
| 51 | 0 | 80 | 0.532330 | 0.296012 | 0.322217 | 0.650045 | 8.042171 | 4.754839 | 5.060159 | 5.833646 | ... | -0.014078 | 0.010696 | -0.003448 | -0.015049 | 0.010195 | -0.002152 | 0.001881 | 9.472404 | 2238.670803 | 1241.852695 |
| 38 | 0 | 60 | 0.182721 | 0.089174 | 0.113216 | 0.651748 | 1.839764 | 0.673977 | 1.084464 | 2.096809 | ... | 0.021454 | 0.007635 | 0.019134 | 0.013320 | 0.002002 | -0.022146 | 0.005825 | 15.420777 | 2313.388825 | 1381.628235 |
51 rows × 133 columns
y_train
13 1 34 0 50 0 3 1 17 1 49 0 8 1 6 1 33 0 4 1 47 0 19 1 54 0 41 0 55 0 31 0 30 1 59 0 60 0 15 1 27 1 26 1 24 1 46 0 11 1 32 0 57 0 45 0 37 0 29 1 43 0 48 0 1 1 21 1 2 1 62 0 39 0 35 0 23 1 53 0 10 1 22 1 18 1 63 0 20 1 7 1 42 0 14 1 28 1 51 0 38 0 Name: Diagnosis (ALS), dtype: int64
y_test
52 0 58 0 0 1 44 0 5 1 36 0 16 1 12 1 25 1 61 0 56 0 9 1 40 0 Name: Diagnosis (ALS), dtype: int64
for i in model:
kfold = KFold(8)
score = cross_val_score(estimator=i,X=x,y=y,cv=kfold)
print(i)
print(f'score:',score)
print(f'mean_value:',score.mean())
print(f'min_value:',score.min())
print('------'*10)
DecisionTreeClassifier() score: [0.625 0.75 0.75 0.5 0.375 0.625 0.625 0.5 ] mean_value: 0.59375 min_value: 0.375 ------------------------------------------------------------ RandomForestClassifier() score: [0.625 0.75 0.875 0.375 0.75 0.375 1. 0.125] mean_value: 0.609375 min_value: 0.125 ------------------------------------------------------------ GradientBoostingClassifier() score: [0.5 0.75 0.875 0.5 0.375 0.625 0.625 0.5 ] mean_value: 0.59375 min_value: 0.375 ------------------------------------------------------------ BaggingClassifier() score: [0.5 0.625 0.75 0.5 0.5 0.75 0.75 0.5 ] mean_value: 0.609375 min_value: 0.5 ------------------------------------------------------------ AdaBoostClassifier() score: [0.375 0.875 0.75 0.25 0.875 0.625 0.875 0.375] mean_value: 0.625 min_value: 0.25 ------------------------------------------------------------ LogisticRegression() score: [0.875 0.75 0.875 0.25 0.625 0.625 0.75 0.625] mean_value: 0.671875 min_value: 0.25 ------------------------------------------------------------ SVC() score: [0.25 0.5 0.375 0.25 0.625 0.625 0.625 0.5 ] mean_value: 0.46875 min_value: 0.25 ------------------------------------------------------------ KNeighborsClassifier() score: [0.375 0.5 0.875 0.25 0.5 0.375 0.75 0.5 ] mean_value: 0.515625 min_value: 0.25 ------------------------------------------------------------ GaussianNB() score: [0.375 0.625 0.625 0.5 0.875 0.75 1. 0.125] mean_value: 0.609375 min_value: 0.125 ------------------------------------------------------------
for i in model:
skf= StratifiedKFold(5)
score2 = cross_val_score(estimator=i,X=x,y=y,cv=skf)
print(i)
print(f'score:',score2)
print(f'mean_value:',score2.mean())
print(f'min_value:',score2.min())
print('------'*10)
DecisionTreeClassifier() score: [0.46153846 0.61538462 1. 0.92307692 0.58333333] mean_value: 0.7166666666666667 min_value: 0.46153846153846156 ------------------------------------------------------------ RandomForestClassifier() score: [0.76923077 0.69230769 0.76923077 0.84615385 0.5 ] mean_value: 0.7153846153846154 min_value: 0.5 ------------------------------------------------------------ GradientBoostingClassifier() score: [0.76923077 0.53846154 0.84615385 0.92307692 0.66666667] mean_value: 0.7487179487179486 min_value: 0.5384615384615384 ------------------------------------------------------------ BaggingClassifier() score: [0.61538462 0.76923077 0.92307692 0.84615385 0.75 ] mean_value: 0.7807692307692308 min_value: 0.6153846153846154 ------------------------------------------------------------ AdaBoostClassifier() score: [0.76923077 0.69230769 0.92307692 0.76923077 0.66666667] mean_value: 0.7641025641025642 min_value: 0.6666666666666666 ------------------------------------------------------------ LogisticRegression() score: [0.76923077 0.84615385 0.76923077 0.69230769 0.5 ] mean_value: 0.7153846153846153 min_value: 0.5 ------------------------------------------------------------ SVC() score: [0.84615385 0.53846154 0.76923077 0.61538462 0.5 ] mean_value: 0.6538461538461539 min_value: 0.5 ------------------------------------------------------------ KNeighborsClassifier() score: [0.46153846 0.46153846 0.69230769 0.69230769 0.5 ] mean_value: 0.5615384615384615 min_value: 0.46153846153846156 ------------------------------------------------------------ GaussianNB() score: [0.69230769 0.69230769 0.84615385 0.84615385 0.5 ] mean_value: 0.7153846153846154 min_value: 0.5 ------------------------------------------------------------
LOO = LeaveOneOut()
for i in model:
score3 = cross_val_score(estimator=i ,X=x,y=y,cv=LOO)
print(i)
print(f'score:',score3)
print(f'mean_value:',score3.mean())
print('------'*10)
DecisionTreeClassifier() score: [1. 1. 1. 1. 0. 0. 0. 0. 0. 0. 1. 1. 0. 1. 1. 1. 1. 1. 1. 1. 1. 0. 0. 1. 1. 1. 1. 0. 1. 0. 1. 1. 1. 0. 1. 1. 1. 1. 0. 1. 0. 0. 0. 0. 1. 1. 0. 1. 1. 1. 0. 1. 0. 0. 1. 1. 0. 1. 1. 0. 1. 1. 0. 0.] mean_value: 0.609375 ------------------------------------------------------------ RandomForestClassifier() score: [1. 1. 0. 1. 0. 0. 1. 1. 1. 0. 1. 1. 0. 1. 0. 1. 1. 1. 1. 1. 1. 1. 1. 0. 0. 1. 1. 0. 1. 1. 0. 1. 1. 0. 1. 1. 1. 1. 1. 1. 0. 1. 1. 0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 0. 1. 1. 1. 0. 0. 0. 0.] mean_value: 0.71875 ------------------------------------------------------------ GradientBoostingClassifier() score: [1. 1. 1. 1. 0. 0. 1. 1. 0. 0. 1. 1. 0. 1. 1. 1. 1. 1. 1. 1. 1. 0. 0. 1. 1. 1. 1. 1. 1. 0. 1. 1. 1. 1. 1. 0. 1. 1. 1. 1. 0. 1. 0. 0. 1. 1. 1. 1. 1. 1. 1. 0. 1. 1. 1. 1. 1. 1. 1. 0. 1. 1. 0. 0.] mean_value: 0.75 ------------------------------------------------------------ BaggingClassifier() score: [1. 1. 1. 1. 0. 0. 1. 1. 1. 0. 1. 1. 0. 1. 1. 1. 1. 1. 1. 1. 1. 0. 0. 1. 1. 1. 1. 0. 1. 1. 0. 1. 1. 1. 1. 0. 1. 1. 1. 1. 0. 1. 0. 0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 0. 1. 1. 1.] mean_value: 0.796875 ------------------------------------------------------------ AdaBoostClassifier() score: [1. 1. 1. 1. 0. 0. 1. 1. 1. 1. 1. 1. 0. 1. 0. 0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 0. 0. 1. 1. 1. 0. 1. 1. 1. 1. 1. 1. 1. 0. 0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 0. 1. 1. 1. 0. 1. 1. 1.] mean_value: 0.8125 ------------------------------------------------------------ LogisticRegression() score: [1. 1. 1. 1. 0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 0. 1. 1. 1. 0. 1. 1. 1. 1. 0. 0. 0. 1. 1. 0. 1. 0. 1. 0. 0. 1. 1. 1. 1. 1. 1. 0. 1. 1. 0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 0. 1. 1. 0. 1. 0. 1. 0. 1. 0. 1.] mean_value: 0.734375 ------------------------------------------------------------ SVC() score: [1. 1. 1. 1. 1. 1. 0. 1. 1. 1. 1. 1. 0. 0. 0. 1. 1. 1. 1. 1. 1. 1. 1. 0. 0. 0. 1. 0. 0. 1. 0. 1. 1. 0. 1. 1. 1. 1. 1. 0. 1. 0. 0. 1. 1. 1. 1. 1. 1. 1. 0. 0. 1. 1. 0. 1. 0. 1. 1. 1. 0. 0. 1. 1.] mean_value: 0.6875 ------------------------------------------------------------ KNeighborsClassifier() score: [0. 1. 0. 1. 0. 1. 0. 1. 1. 1. 1. 1. 0. 0. 0. 0. 1. 1. 1. 1. 1. 1. 1. 0. 0. 0. 0. 0. 0. 1. 0. 1. 1. 0. 1. 1. 1. 0. 1. 0. 0. 0. 0. 1. 1. 1. 0. 1. 1. 1. 0. 1. 1. 1. 0. 1. 0. 1. 1. 1. 0. 0. 1. 1.] mean_value: 0.578125 ------------------------------------------------------------ GaussianNB() score: [1. 0. 0. 1. 0. 0. 1. 1. 0. 0. 1. 1. 0. 1. 1. 1. 1. 1. 0. 0. 1. 1. 1. 0. 0. 1. 1. 0. 1. 1. 0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 0. 0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 0. 0. 1. 0. 0.] mean_value: 0.703125 ------------------------------------------------------------
models =DecisionTreeClassifier(max_depth=8, min_samples_split=6, splitter='random')
models.fit(x_train,y_train)
DecisionTreeClassifier(max_depth=8, min_samples_split=6, splitter='random')
pred = models.predict(x_test)
print(classification_report(y_test, pred))
precision recall f1-score support
0 0.67 0.86 0.75 7
1 0.75 0.50 0.60 6
accuracy 0.69 13
macro avg 0.71 0.68 0.68 13
weighted avg 0.71 0.69 0.68 13
models =RandomForestClassifier(max_features='sqrt', n_jobs=-1, random_state=42)
models.fit(x_train,y_train)
RandomForestClassifier(max_features='sqrt', n_jobs=-1, random_state=42)
pred = models.predict(x_test)
print(classification_report(y_test,pred))
precision recall f1-score support
0 0.70 1.00 0.82 7
1 1.00 0.50 0.67 6
accuracy 0.77 13
macro avg 0.85 0.75 0.75 13
weighted avg 0.84 0.77 0.75 13
models=BaggingClassifier(max_samples=8, n_estimators=40)
models.fit(x_train,y_train)
BaggingClassifier(max_samples=8, n_estimators=40)
pred = models.predict(x_test)
print(classification_report(y_test,pred))
precision recall f1-score support
0 0.78 1.00 0.88 7
1 1.00 0.67 0.80 6
accuracy 0.85 13
macro avg 0.89 0.83 0.84 13
weighted avg 0.88 0.85 0.84 13
model =KNeighborsClassifier(algorithm='ball_tree', p=3)
model.fit(x_train,y_train)
KNeighborsClassifier(algorithm='ball_tree', p=3)
pred= model.predict(x_test)
print(classification_report(y_test,pred))
precision recall f1-score support
0 0.50 0.29 0.36 7
1 0.44 0.67 0.53 6
accuracy 0.46 13
macro avg 0.47 0.48 0.45 13
weighted avg 0.47 0.46 0.44 13
models = [
('DecisionTreeClassifier',DecisionTreeClassifier()),
('RandomForestClassifier', RandomForestClassifier()),
('GradientBoostingClassifier', GradientBoostingClassifier()),
('BaggingClassifier',BaggingClassifier()),
('AdaBoostClassifier',AdaBoostClassifier()),
('LogisticRegression',LogisticRegression()),
('SVC',SVC()),
('KNeighborsClassifier',KNeighborsClassifier()),
('GaussianNB',GaussianNB())
]
para_grids= {
'DecisionTreeClassifier':{
'criterion':['gini','entropy','log_loss'],
'splitter':['best','random'],
'max_depth':[6,8,10,12],
'min_samples_split':[2,3,4,5,6]
},
'RandomForestClassifier':{
'n_estimators':[10,40,50,60,70,100],
'criterion':['gini','entropy','log_loss'],
'max_depth':[6,8,10,12],
'min_samples_split':[2,3,4,5,6]
},
'GradientBoostingClassifier':{
'n_estimators':[10,40,50,60,70,100],
'min_samples_split':[2,3,4,5,6]
},
'BaggingClassifier':{
'n_estimators':[10,40,50,60,70,100],
'max_samples':[6,8,10,12]
},
'AdaBoostClassifier':{
'n_estimators':[10,40,50,60,70,100]
},
'LogisticRegression':{
},
'SVC':{
},
'KNeighborsClassifier':{
'n_neighbors':[2,3,4,5],
'weights':['distance','uniform'],
'algorithm':['ball_tree','kd_tree','brute'],
'p':[2,3,4,5,6]
},
'GaussianNB':{}
}
for model_name,model_instance in models:
print(f'Model: {model_name}')
Gscv = GridSearchCV(estimator=model_instance,param_grid=para_grids[model_name],cv=5,n_jobs=-1)
# Fit the model
Gscv.fit(x_train,y_train)
# Make predictions
pred = Gscv.predict(x_test)
# Print classification report
# Get the best estimator
print(Gscv.best_estimator_)
print(classification_report(y_test, pred))
print('------'*10)
Model: DecisionTreeClassifier
DecisionTreeClassifier(max_depth=12, min_samples_split=5)
precision recall f1-score support
0 0.50 0.71 0.59 7
1 0.33 0.17 0.22 6
accuracy 0.46 13
macro avg 0.42 0.44 0.41 13
weighted avg 0.42 0.46 0.42 13
------------------------------------------------------------
Model: RandomForestClassifier
RandomForestClassifier(max_depth=6, min_samples_split=6, n_estimators=50)
precision recall f1-score support
0 0.70 1.00 0.82 7
1 1.00 0.50 0.67 6
accuracy 0.77 13
macro avg 0.85 0.75 0.75 13
weighted avg 0.84 0.77 0.75 13
------------------------------------------------------------
Model: GradientBoostingClassifier
GradientBoostingClassifier(min_samples_split=6, n_estimators=40)
precision recall f1-score support
0 0.62 0.71 0.67 7
1 0.60 0.50 0.55 6
accuracy 0.62 13
macro avg 0.61 0.61 0.61 13
weighted avg 0.61 0.62 0.61 13
------------------------------------------------------------
Model: BaggingClassifier
BaggingClassifier(max_samples=12, n_estimators=70)
precision recall f1-score support
0 0.70 1.00 0.82 7
1 1.00 0.50 0.67 6
accuracy 0.77 13
macro avg 0.85 0.75 0.75 13
weighted avg 0.84 0.77 0.75 13
------------------------------------------------------------
Model: AdaBoostClassifier
AdaBoostClassifier(n_estimators=60)
precision recall f1-score support
0 0.75 0.86 0.80 7
1 0.80 0.67 0.73 6
accuracy 0.77 13
macro avg 0.78 0.76 0.76 13
weighted avg 0.77 0.77 0.77 13
------------------------------------------------------------
Model: LogisticRegression
LogisticRegression()
precision recall f1-score support
0 0.83 0.71 0.77 7
1 0.71 0.83 0.77 6
accuracy 0.77 13
macro avg 0.77 0.77 0.77 13
weighted avg 0.78 0.77 0.77 13
------------------------------------------------------------
Model: SVC
SVC()
precision recall f1-score support
0 0.71 0.71 0.71 7
1 0.67 0.67 0.67 6
accuracy 0.69 13
macro avg 0.69 0.69 0.69 13
weighted avg 0.69 0.69 0.69 13
------------------------------------------------------------
Model: KNeighborsClassifier
KNeighborsClassifier(algorithm='ball_tree', p=4)
precision recall f1-score support
0 0.50 0.29 0.36 7
1 0.44 0.67 0.53 6
accuracy 0.46 13
macro avg 0.47 0.48 0.45 13
weighted avg 0.47 0.46 0.44 13
------------------------------------------------------------
Model: GaussianNB
GaussianNB()
precision recall f1-score support
0 0.75 0.86 0.80 7
1 0.80 0.67 0.73 6
accuracy 0.77 13
macro avg 0.78 0.76 0.76 13
weighted avg 0.77 0.77 0.77 13
------------------------------------------------------------
for model_name,model_instance in models:
print(f'Model: {model_name}')
rscv = RandomizedSearchCV(estimator=model_instance,param_distributions=para_grids[model_name],cv=5,n_jobs=-1)
# Fit the model
rscv.fit(x_train,y_train)
# Make predictions
pred = rscv.predict(x_test)
# Print classification report
# Get the best estimator
print(rscv.best_estimator_)
print(classification_report(y_test, pred))
print('------'*10)
Model: DecisionTreeClassifier
DecisionTreeClassifier(max_depth=12, min_samples_split=3)
precision recall f1-score support
0 0.57 0.57 0.57 7
1 0.50 0.50 0.50 6
accuracy 0.54 13
macro avg 0.54 0.54 0.54 13
weighted avg 0.54 0.54 0.54 13
------------------------------------------------------------
Model: RandomForestClassifier
RandomForestClassifier(max_depth=10, min_samples_split=3)
precision recall f1-score support
0 0.60 0.86 0.71 7
1 0.67 0.33 0.44 6
accuracy 0.62 13
macro avg 0.63 0.60 0.58 13
weighted avg 0.63 0.62 0.59 13
------------------------------------------------------------
Model: GradientBoostingClassifier
GradientBoostingClassifier(min_samples_split=6, n_estimators=10)
precision recall f1-score support
0 0.62 0.71 0.67 7
1 0.60 0.50 0.55 6
accuracy 0.62 13
macro avg 0.61 0.61 0.61 13
weighted avg 0.61 0.62 0.61 13
------------------------------------------------------------
Model: BaggingClassifier
BaggingClassifier(max_samples=10, n_estimators=100)
precision recall f1-score support
0 0.67 0.86 0.75 7
1 0.75 0.50 0.60 6
accuracy 0.69 13
macro avg 0.71 0.68 0.68 13
weighted avg 0.71 0.69 0.68 13
------------------------------------------------------------
Model: AdaBoostClassifier
AdaBoostClassifier(n_estimators=60)
precision recall f1-score support
0 0.75 0.86 0.80 7
1 0.80 0.67 0.73 6
accuracy 0.77 13
macro avg 0.78 0.76 0.76 13
weighted avg 0.77 0.77 0.77 13
------------------------------------------------------------
Model: LogisticRegression
LogisticRegression()
precision recall f1-score support
0 0.83 0.71 0.77 7
1 0.71 0.83 0.77 6
accuracy 0.77 13
macro avg 0.77 0.77 0.77 13
weighted avg 0.78 0.77 0.77 13
------------------------------------------------------------
Model: SVC
SVC()
precision recall f1-score support
0 0.71 0.71 0.71 7
1 0.67 0.67 0.67 6
accuracy 0.69 13
macro avg 0.69 0.69 0.69 13
weighted avg 0.69 0.69 0.69 13
------------------------------------------------------------
Model: KNeighborsClassifier
KNeighborsClassifier(algorithm='kd_tree', p=6)
precision recall f1-score support
0 0.50 0.29 0.36 7
1 0.44 0.67 0.53 6
accuracy 0.46 13
macro avg 0.47 0.48 0.45 13
weighted avg 0.47 0.46 0.44 13
------------------------------------------------------------
Model: GaussianNB
GaussianNB()
precision recall f1-score support
0 0.75 0.86 0.80 7
1 0.80 0.67 0.73 6
accuracy 0.77 13
macro avg 0.78 0.76 0.76 13
weighted avg 0.77 0.77 0.77 13
------------------------------------------------------------
pip install tensorflow
Requirement already satisfied: tensorflow in c:\users\vinayaka\anaconda3\lib\site-packages (2.16.1) Requirement already satisfied: tensorflow-intel==2.16.1 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow) (2.16.1) Requirement already satisfied: google-pasta>=0.1.1 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (0.2.0) Requirement already satisfied: libclang>=13.0.0 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (18.1.1) Requirement already satisfied: numpy<2.0.0,>=1.23.5 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (1.26.4) Requirement already satisfied: tensorboard<2.17,>=2.16 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (2.16.2) Requirement already satisfied: gast!=0.5.0,!=0.5.1,!=0.5.2,>=0.2.1 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (0.5.4) Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.23.1 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (0.31.0) Requirement already satisfied: absl-py>=1.0.0 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (2.1.0) Requirement already satisfied: requests<3,>=2.21.0 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (2.28.1) Requirement already satisfied: h5py>=3.10.0 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (3.11.0) Requirement already satisfied: six>=1.12.0 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (1.16.0) Requirement already satisfied: wrapt>=1.11.0 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (1.14.1) Requirement already satisfied: setuptools in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (63.4.1) Requirement already satisfied: ml-dtypes~=0.3.1 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (0.3.2) Requirement already satisfied: astunparse>=1.6.0 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (1.6.3) Requirement already satisfied: grpcio<2.0,>=1.24.3 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (1.64.1) Requirement already satisfied: packaging in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (21.3) Requirement already satisfied: opt-einsum>=2.3.2 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (3.3.0) Requirement already satisfied: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.20.3 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (4.25.3) Requirement already satisfied: typing-extensions>=3.6.6 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (4.3.0) Requirement already satisfied: flatbuffers>=23.5.26 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (24.3.25) Requirement already satisfied: termcolor>=1.1.0 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (2.4.0) Requirement already satisfied: keras>=3.0.0 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorflow-intel==2.16.1->tensorflow) (3.3.3) Requirement already satisfied: wheel<1.0,>=0.23.0 in c:\users\vinayaka\anaconda3\lib\site-packages (from astunparse>=1.6.0->tensorflow-intel==2.16.1->tensorflow) (0.37.1) Requirement already satisfied: namex in c:\users\vinayaka\anaconda3\lib\site-packages (from keras>=3.0.0->tensorflow-intel==2.16.1->tensorflow) (0.0.8) Requirement already satisfied: rich in c:\users\vinayaka\anaconda3\lib\site-packages (from keras>=3.0.0->tensorflow-intel==2.16.1->tensorflow) (13.7.1) Requirement already satisfied: optree in c:\users\vinayaka\anaconda3\lib\site-packages (from keras>=3.0.0->tensorflow-intel==2.16.1->tensorflow) (0.11.0) Requirement already satisfied: charset-normalizer<3,>=2 in c:\users\vinayaka\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorflow-intel==2.16.1->tensorflow) (2.0.4) Requirement already satisfied: idna<4,>=2.5 in c:\users\vinayaka\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorflow-intel==2.16.1->tensorflow) (3.3) Requirement already satisfied: certifi>=2017.4.17 in c:\users\vinayaka\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorflow-intel==2.16.1->tensorflow) (2022.9.14) Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\vinayaka\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorflow-intel==2.16.1->tensorflow) (1.26.11) Requirement already satisfied: werkzeug>=1.0.1 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorboard<2.17,>=2.16->tensorflow-intel==2.16.1->tensorflow) (2.0.3) Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorboard<2.17,>=2.16->tensorflow-intel==2.16.1->tensorflow) (0.7.2) Requirement already satisfied: markdown>=2.6.8 in c:\users\vinayaka\anaconda3\lib\site-packages (from tensorboard<2.17,>=2.16->tensorflow-intel==2.16.1->tensorflow) (3.3.4) Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in c:\users\vinayaka\anaconda3\lib\site-packages (from packaging->tensorflow-intel==2.16.1->tensorflow) (3.0.9) Requirement already satisfied: pygments<3.0.0,>=2.13.0 in c:\users\vinayaka\anaconda3\lib\site-packages (from rich->keras>=3.0.0->tensorflow-intel==2.16.1->tensorflow) (2.18.0) Requirement already satisfied: markdown-it-py>=2.2.0 in c:\users\vinayaka\anaconda3\lib\site-packages (from rich->keras>=3.0.0->tensorflow-intel==2.16.1->tensorflow) (3.0.0) Requirement already satisfied: mdurl~=0.1 in c:\users\vinayaka\anaconda3\lib\site-packages (from markdown-it-py>=2.2.0->rich->keras>=3.0.0->tensorflow-intel==2.16.1->tensorflow) (0.1.2) Note: you may need to restart the kernel to use updated packages.
import tensorflow as tf
model = tf.keras.Sequential([
tf.keras.layers.Dense(36,input_shape= (x_train.shape[1],),activation= 'relu'),
tf.keras.layers.Dense(10,activation='elu'),
tf.keras.layers.Dense(1,activation='sigmoid')
])
model.compile(optimizer='Adam',loss='binary_crossentropy',metrics=['accuracy'])
history = model.fit(x_train,y_train,batch_size=6,epochs=100,verbose=0)
his_df = pd.DataFrame(history.history)
his_df.head()
| accuracy | loss | |
|---|---|---|
| 0 | 0.490196 | 110.409637 |
| 1 | 0.411765 | 43.312870 |
| 2 | 0.411765 | 20.571758 |
| 3 | 0.392157 | 18.936363 |
| 4 | 0.352941 | 10.823765 |
his_df.plot()
<AxesSubplot:>
loss,accuracy = model.evaluate(x_test,y_test)
1/1 ━━━━━━━━━━━━━━━━━━━━ 0s 304ms/step - accuracy: 0.8462 - loss: 0.3102
accuracy
0.8461538553237915